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