| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Write a program or provide a pseudo code to flip the 2nd bit
of the 32 bit number ! (Phone Screen) | NetApp | 1 |
| f(*p)
{
p=(char *)malloc(6);
p="hello";
return;
}
main()
{
char *p="bye";
f(p);
printf("%s",p);
}
what is the o/p?
| Hughes | 2 |
| what is the differance between pass by reference and pass
by value. | Infosys | 4 |
| What is the Difference between Class and Struct? | Motorola | 9 |
| What ios diff. Between %e & %f? | Honeywell | 1 |
| what is the stackpointer | | 2 |
| 11. Look at the Code:
#include<string.h>
void main()
{
char s1[]="abcd";
char s2[10];
char s3[]="efgh";
int i;
clrscr();
i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd"));
printf("%d",i);
}
What will be the output?
A)No output B) A Non Integer C)0 D) Garbage
| Accenture | 5 |
| main()
{
printf(5+"Vidyarthi Computers");
} | | 5 |
| 1,4,8,13,21,30,36,45,54,63,73,?,?. | Franklin-Templeton | 3 |
| main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}
| CitiGroup | 13 |
| Which is not valid in C?
1) class aClass{public:int x;}
2) /* A comment */
3) char x=12;
| | 4 |
| Write the program for displaying the ten most frequent words
in a file such that your program should be efficient in all
complexity measures. | Google | 3 |
| What is the difference between null pointer and void pointer | CTS | 2 |
| write a program to print sum of each row of a 2D array.
| | 2 |
| what is the difference between const volatile int i
& volatile const int j; | HCL | 1 |
| Function to find the given number is a power of 2 or not? | Motorola | 9 |
| what is a static function | Satyam | 9 |
| Why the use of alloca() is discouraged?
| Oracle | 2 |
| YBJBU6 | | 1 |
| Design a program using an array that lists even numbers and
odd numbers separately from the 12 numbers supplied by a user. | | 4 |
| |
| For more C Interview Questions Click Here |