| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What is the output for the following program
#include<stdio.h>
main()
{
char a[5][5],flag;
a[0][0]='A';
flag=((a==*a)&&(*a==a[0]));
printf("%d\n",flag);
}
| ADITI | 5 |
| What is true about the following
C Functions
a.Need not return any value
b.Should always return an integer
c.Should always return a float
d.Should always return more than one value.
| TCS | 7 |
| what is the value of 'i'?
i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green")
| Cadence | 4 |
| which header file contains main() function in c? | TCS | 3 |
| ABCDCBA
ABC CBA
AB BA
A A | | 1 |
| what is output of the following statetment?Printf(“%x”,
-1<<4); ? | | 3 |
| what is the difference between arrays and linked list | Tech-Mahindra | 15 |
| do ne body have any idea about the salary for the we r going
to have interview.
yup .. u got it right ..i m talking abt NIC. | | 1 |
| who will call your main function in c under linux? | | 2 |
| Binary tree traversing | Qualcomm | 1 |
| 2.main
{
int x,j,k;
j=k=6;x=2;
x=j*k;
printf("%d", x);
| HCL | 6 |
| 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 |
| Evaluate the following:
int fn(int v)
{
if(v==1 || v==0)
return 1;
if(v%2==0)
return fn(v/2)+2;
else
return fn(v-1)+3;
}
for fn(7);
1) 10
2) 11
3) 1
| | 6 |
| main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%s\n",ptr);
ptr++;
printf("%s\n",ptr);
}
Find the Outputs? | CitiGroup | 7 |
| explain about storage of union elements. | Bosch | 2 |
| what is compiler | | 5 |
| write a program that explain #define and # undef directive | | 1 |
| Two's compliment of -5 | Adobe | 3 |
| main()
{
int i=400,j=300;
printf("%d..%d");
}
| ME | 8 |
| Write a C program to print 1 2 3 ... 100 without using
loops? | | 5 |
| |
| For more C Interview Questions Click Here |