| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the definition of storage classes? | Wipro | 2 |
| what are the general concepts of c and c++ | | 1 |
| implement general tree using link list | Wipro | 1 |
| What is the difference between null pointer and void pointer | CTS | 3 |
| In the following code segment what will be the result of the
function,
value of x , value of y
{
unsigned int x=-1;
int y;
y = ~0;
if(x == y)
printf("same");
else
printf("not same");
}
a) same, MAXINT, -1
b) not same, MAXINT, -MAXINT
c) same , MAXUNIT, -1
d) same, MAXUNIT, MAXUNIT
e) not same, MAXINT, MAXUNIT
| IBM | 1 |
| Can I pass constant values to functions which accept structure
arguments? | | 2 |
| identify the in correct expression
a.a=b=3=4;
b.a=b=c=d=0;
float a=int b=3.5;
d.int a;
float b;
a=b=3.5;
| TCS | 5 |
| Which of the following about the C comments is incorrect ?
a.commentscan go over multiple lines
b.comments can start any where in the line
c.a line can contain comments with out any language statements
d.comments can occur within comments
| TCS | 6 |
| the format specified for hexa decimal is
a.%d
b.%o
c.%x
d.%u
| TCS | 4 |
| value = 0xabcd;
for (loop = 1; (value >> 1) & 1 | loop & 1; loop++) {
foo();
if (loop & 1)
value >>= 1;
}
how many times is foo() executed? | Google | 5 |
| #include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}
| ME | 5 |
| What is macro? | IBM | 4 |
| There are 3 baskets of fruits with worng lables,one basket
has apple,another basket has orange,another has combination
of apple and orange,what is the least way of interchange
the lables. | Google | 10 |
| What are the different pointer models in c? | | 3 |
| what is the output of the following program?
main()
{
int c[]={2,8,3,4,4,6,7,5};
int j,*p=c,*q=c;
for(j=0;j<5;j++)
{
printf("%d",*c);
++q;
}
for(j=0;j<5;j++)
{
printf("%d",*p);
++p;
}
} | | 4 |
| IS STRUCTURES CAN BE USED WITHIN AN ARRAY? | Caritor | 7 |
| how to find the kth smallest element in the given list of
array elemnts.
| Silicon | 5 |
| How to reverse a string using a recursive function, with
swapping? | | 4 |
| if a person is buying coconuts of Rs10,and then sell that
coconuts of Rs9,with the loss of one rupee.After that the
person became a millaniore.how? | Wipro | 5 |
| declare afunction pointer to int printf(char *)? | HCL | 1 |
| |
| For more C Interview Questions Click Here |