| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Which of the following data structures is on average the
fastest for retrieving data:
1) Binary Tree
2) Hash Table
3) Stack
| | 3 |
| What is the difference b/w main() in C language and main()
in C++. | | 3 |
| char S;
char S[6]= " HELLO";
printf("%s ",S[6]);
output of the above program ?
(0, ASCII 0, I,unpredictable)
| Mascot | 3 |
| Result of the following program is
main()
{
int i=0;
for(i=0;i<20;i++)
{
switch(i)
case 0:i+=5;
case 1:i+=2;
case 5:i+=5;
default i+=4;
break;}
printf("%d,",i);
}
}
a)0,5,9,13,17
b)5,9,13,17
c)12,17,22
d)16,21
e)syntax error
| IBM | 3 |
| write a program to find out number of on bits in a number?
| Huawei | 11 |
| f(char *p)
{
p=(char *)malloc(sizeof(6));
strcpy(p,"HELLO");
}
main()
{
char *p="BYE";
f(p)
printf("%s",p);
}
what is the output?
| Hughes | 6 |
| f1()
{
f(3);}
f(int t)
{
switch(t);
{
case 2: c=3;
case 3: c=4;
case 4: c=5;
case 5: c=6;
default: c=0;}
value of c?
| Geometric-Software | 5 |
| how to connect oracle in C/C++. | | 2 |
| Why the use of alloca() is discouraged?
| Oracle | 2 |
| What do you mean by team?? | | 2 |
| how to estimate the disk access time?
e.g. the time between read one byte and another byte in the
disk. | Google | 3 |
| What are the uses of pre-processor directives? | | 2 |
| 52.write a “Hello World” program in “c” without using a
semicolon?
53.Give a method to count the number of ones in a 32 bit number?
54.write a program that print itself even if the source file
is deleted?
55.Given an unsigned integer, find if the number is power of 2? | | 3 |
| what is the difference between NULL & NUL keywords in C? | | 3 |
| Write a program to interchange two variables without using
the third variable? | Accenture | 9 |
| how to exchnage bits in a byte
b7<-->b0 b6<-->b1 b5<-->b2 b4<-->b3
please mail me the code if any one know to
rajeshmb4u@gmail.com | Honeywell | 3 |
| fun(int x)
{
if(x > 0)
fun(x/2);
printf("%d", x);
}
above function is called as:
fun(10);
what will it print?
} | NDS | 12 |
| What ios diff. Between %e & %f? | Honeywell | 1 |
| what are two categories of clint-server application
development ? | | 1 |
| Write a program to write a given string in maximum
possibilities?
i.e str[5]="reddy";
i.e we can write this string in 120 ways
for that write a program | Subex | 3 |
| |
| For more C Interview Questions Click Here |