Flag this interview question as inappropriate Inappropriate
See Answer
both are same.  a[i] is treated as *(a+i), and i[a] is *(i+a).  And from the rule of associativity, we can see that both expressions will yield to the same result.
Create Date
:
Saturday, March 15, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
int main ()
{   int i,j,k;
  for(i=1;i<4;i++)
  {     for(j=1;j<4;j++)
    {       for(k=1;k<4;k++)
      {         if((i!=j) && (j!=k) && (i!=k))
        {           printf("%d%d%dn",i,j,k);
        }}}}}
Create Date
:
Saturday, March 15, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
heap memory used for dynamic memory allocation using malloc,realloc,new etc
global and static variable are stored in data segment.

Create Date
:
Saturday, March 15, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
String is a collection of charecter,it must be ended with null.
Charecter array is aset of elements if you didn't give a space for null,it shows error.
Create Date
:
Saturday, March 15, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
The size of the structutre will be the total size of fields holded by that structure.
Create Date
:
Saturday, March 15, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
There are various things to be observed for this
1. First of all while at the time of storing
      single character is stored as char abc = 's';
         where as string having single character can be stored as char pqr[] = "s";
2. single character takes one byte for storage
    String (even single character is stored) takes two bytes, one for one character and second for null character
    This can be verified by following C statement:
       printf("%d %d", sizeof(abc), sizeof(pqr));
    which gives output as 1 and 2 respectively. (assuming turbo C compiler and 1 byte for char)
Create Date
:
Saturday, March 15, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
-> The same auto variable name can be used in different blocks-> There is no side effect by changing the values in the blocks
-> The memory is economically used-> Auto variables have inherent protection because of local scope
Create Date
:
Saturday, March 15, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
most of the times you need to zero out the mem by using bzero or memset.U need not do it that way here.And also if it is to be alocated for a string,strlen(allocated array) is automatically 0.Which is a much safer method
Create Date
:
Saturday, March 15, 2008
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
Be the first one to answer the question Click here to answer
Create Date
:
Saturday, March 15, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 
Flag this interview question as inappropriate Inappropriate
See Answer
int *a=new int[];
arrays and pointers are similar things .if you want to access any element just type a[element no] and access the element
Create Date
:
Saturday, March 15, 2008
Tags
:
Asked At
:
None
Job Positions
:
Click here to improve the Interview Question, Answer and other fields.
Comments (0) :
Goto add your comment on the Question 


Check out our newest job listings!

Post a Job! $49 for 60 days



Suggestions & Comments




User Question Statistics
Questions Asked (43)
Questions Updated (0)
Questions Answered (40)
Answers Updated (0)
Share Your Interview Questions
Ask Interview Questions
View Unanswered Questions

















Advertise on this site