| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Which of the following is not an infinite loop ?
a.while(1){
....
}
b.for(;;){
...
}
c.x=0;
do{
/*x unaltered within theloop*/
...
}while(x==0);
d.# define TRUE 0
...
while(TRUE){
....
}
| TCS | 4 |
| what about "char *(*(*a[])())();"
| Oracle | 2 |
| main is a predefined or user define function
if user defined why?
if predefined whay? | TCS | 2 |
| Toggle nth bit in a given integer - num | Qualcomm | 2 |
| what is a function pointer and how all to declare ,define
and implement it ??? | Honeywell | 3 |
| write a program that explain #define and # undef directive | | 1 |
| What are volatile variables? | | 1 |
| how many keywords do C compile? | Microsoft | 2 |
| How to calculate Total working time using Login and
logout? | Wipro | 2 |
| void main()
{
int i=5;
printf("%d",i++ + ++i);
} | ME | 11 |
| If "AaBbCc" is passed to the char
char x(*a)
{
a[0]?x(a+1):1;
printf("%c",a[0]);
return 1;
}
what will be the output?
| Hughes | 5 |
| how to print "hai" in c? | | 10 |
| in C-programming language without using printf statement
can we get output r not ? if yes how and if no also how ?
| | 6 |
| what is the use of a array in c | | 4 |
| Convert the following expression to postfix and prefix
X $ Y Z - M + N + P / Q / (R + S)
| | 2 |
| 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 |
| what is the use of #pragma pack, wer it is used? | Wipro | 1 |
| to find out the reverse digit of a given number | Infosys | 5 |
| WRITE A PROGRAM TO FIND A REVERSE OF TWO NO | | 5 |
| how to find out the inorder successor of a node in a tree?? | TCS | 2 |
| |
| For more C Interview Questions Click Here |