| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| which one is not preprocessor directive
a)#if b)#elif c)#undef d)#pragma
| Wipro | 13 |
| #include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}
| ME | 5 |
| program for comparing 2 strings without strcmp() | | 3 |
| What is the main differences between C and Embedded C? | | 2 |
| Average of a couple 10 years ago was 25. The average
remains same after having a child and twins after 3 years.
What is the present age of the first child | IBM | 9 |
| how to sort two array of characters and make a new array of
characters. | Accenture | 1 |
| 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? | | 6 |
| What are the uses of pre-processor directives? | | 2 |
| C,c++, Java is all are structural oriented or procedure
oriented language..? | | 3 |
| What are bit fields? What is their use? | Adobe | 1 |
| what are the general concepts of c and c++ | | 1 |
| main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
} | NDS | 15 |
| how many error occurs in C language ? | Wipro | 11 |
| N O S I E R
+ A S T R A L
----------------
7 2 5 6 1 3 | Honeywell | 2 |
| how to find the binary of a number? | Infosys | 5 |
| for example user gives input as " 20 or 20.0 or rs 20.0 or
20.00 or rs20 and so .. on " and the output should be
stored as " rs.20.00 " in a variable | | 2 |
| What are .h files and what should I put in them? | | 3 |
| main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%s\n",ptr);
ptr++;
printf("%s\n",ptr);
}
Find the Outputs? | CitiGroup | 7 |
| Explain in detail how strset (string handling function
works )pls explain it with an example. | | 1 |
| main()
{
char *p;
p="Hello";
printf("%c\n",*&*p);
}
| ME | 2 |
| |
| For more C Interview Questions Click Here |