| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What is macro? | IBM | 4 |
| what is the output of the following program?
main()
{
int i=-1,j=-1,k=0,l=2,m;
m=i++&&j++&&k++||l++;
printf("%d %d %d %d %d",i,j,k,l,m);
} | | 7 |
| a.One Cannot Take the address of a Bit Field
b.bit fields cannot be arrayed
c.Bit-Fields are machine Dependant
d.Bit-fields cannot be declared as static
Which of the Following Statements are true w.r.t Bit-Fields
A)a,b&c B)Only a & b C)Only c D)All
| Accenture | 2 |
| Toggle nth bit in a given integer - num | Qualcomm | 2 |
| What is function pointer and where we will use it | NetApp | 1 |
| CAN WE DEFINE ANY FUNCTION WITHIN A FUNCTION. | | 6 |
| without using arithmatic operator solve which number is
greater?????????? | | 1 |
| How would you write qsort? | | 1 |
| #include <stdio.h>
#define sqr(x) (x*x)
int main()
{
int x=2;
printf("value of x=%d",sqr(x+1));
}
What is the value of x?
| Oracle | 13 |
| Write a program to find the given number is odd or even
without using any loops(if,for,do,while) | | 2 |
| Write a program which take a integer from user and tell
whether the given variable is squar of some number or not.
eg: is this number is 1,4,9,16... or not
| Alcatel | 8 |
| 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 |
| void main()
{
int s[4][2]={ {1234,56},{1212,33},{1434,80},{1312,78} };
int (*p)[2];
int i,j,*pint;
for(i=0;i<=3;i++)
{
p=&s[i];
pint=p;
printf("\n");
for(j=0;j<=1;j++)
printf("%d",*(pint+j));
}
} while running this program it shows a warning-suspicious
pointer conversion ie pint=p; my que is why should we assign
the value of p to pint again.why cant we use it directly as
*(p+j)..but if i use like tat the o/p is garbage value.. | | 1 |
| to find out the reverse digit of a given number | Infosys | 5 |
| What compilation do? | Geometric-Software | 7 |
| 1,1,5,17,61,217,?,?. | | 3 |
| WRITE A PROGRAM IN C TO MULTIPLY TWO 2-D ARRAYS | | 4 |
| write a program for odd numbers? | | 6 |
| void main()
{
int i=5;
printf("%d",i+++++i);
}
| ME | 12 |
| How the C program can be compiled? | HP | 7 |
| |
| For more C Interview Questions Click Here |