| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| #include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}
| ME | 5 |
| 9.how do you write a function that takes a variable number
of arguments? What is the prototype of printf () function?
10.How do you access command-line arguments?
11.what does ‘#include<stdio.h>’ mean?
12.what is the difference between #include<> and #include”…”?
13.what are # pragma staments?
14.what is the most appropriate way to write a
multi-statement macro? | L&T | 4 |
| 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 |
| Can we include one C program into another C program if yes how? | Infosys | 4 |
| what is disadvantage of pointer in C | Tech-Mahindra | 5 |
| 1.find the second maximum in an array?
2.how do you create hash table in c?
3.what is hash collision | Qualcomm | 6 |
| If 4 digits number is input through the keyboard, Write a
program to calculate sum of its 1st & 4th digit. | | 4 |
| Convert the following expression to postfix and prefix
(A+B) * (D-C) | Satyam | 2 |
| what is the differnce between AF_INET and PF_INET? | Wipro | 2 |
| 15.what is the disadvantage of using macros?
16.what is the self-referential structure?
17.can a union be self-referenced?
18.What is a pointer?
19.What is the Lvalue and Rvalue?
20.what is the difference between these initializations?
21.Char a[]=”string”;
22.Char *p=”literal”;
23.Does *p++ increment p, or what it points to? | | 1 |
| please give me answer with details
#include<stdio.h>
main()
{
int i=1;
i=(++i)*(++i)*(++i);
printf("%d",i);
getch();
} | | 3 |
| what is the use of #pragma pack, wer it is used? | Wipro | 1 |
| If we give two names then this displays the connection
between the two people. It is nothing but flames game | | 1 |
| int i;
i=2;
i++;
if(i=4)
{
printf(i=4);
}
else
{
printf(i=3);
}
output of the program ?
| Mascot | 9 |
| main()
{
int i,j,A;
for(A=-1;A<=1;A++)
prinf("%d\t",!!A);
} | | 5 |
| Tell about strtok & strstr functions | Motorola | 2 |
| will u give me old quesrion papers for aptitude for L & t
info tech? | L&T | 1 |
| What is the diffences between Windows XP and Windows Visa
| Aricent | 1 |
| what is the use of a array in c | | 4 |
| YBJBU6 | | 1 |
| |
| For more C Interview Questions Click Here |