| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Will Macros support multiple arguments ?
| Oracle | 5 |
| f=(x>y)?x:y
a) f points to max of x and y
b) f points to min of x and y
c)error
| HCL | 3 |
| the code is::::: if(condition)
printf("hello");
else
printf("world");
WHAT WILL BE THE CONDITION IN IF IN SUCH A WAY THAT BOTH
HELLO AND WORLD ARE PRINTED IN A SINGLE ATTEMPT?????? SINGLE
ATTEMPT IN THE SENSE... IT MUST FIRST PRINT "HELLO" AND IT
MUST GO TO ELSE PART AND PRINT "WORLD"..... NO LOOPS,
RECURSION ARE ALLOWED........................ | IBM | 7 |
| write a own function for strstr | LG-Soft | 1 |
| What is the difference b/w main() in C language and main()
in C++. | | 3 |
| What does extern mean in a function declaration? | | 2 |
| What is structure packing ? | HP | 1 |
| struct ptr
{
int a;
char b;
int *p;
}abc;
what is d sizeof structure without using "sizeof" operator?? | Verifone | 3 |
| what is the maximum no. of bytes calloc can allocate | Mphasis | 2 |
| explain memory layout of a C program | | 1 |
| Software Interview Questions | CAT | 1 |
| printf("%d",(printf("Hello")); What it returns?
| TCS | 18 |
| in C-programming language without using printf statement
can we get output r not ? if yes how and if no also how ?
| | 4 |
| What's the difference between a linked list and an array?
| | 8 |
| a 'c' program to tell that the set of three coordinates lie
on a same line | Persistent | 1 |
| what are brk, sbrk?
| Oracle | 1 |
| #include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}
| ME | 4 |
| difference between semaphores and mutex? | | 1 |
| 1.write a program to merge the arrays
2.write efficient code for extracting unique elements from a
sorted list of array? | Qualcomm | 1 |
| In scanf h is used for | BFL | 2 |
| |
| For more C Interview Questions Click Here |