| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| main()
{
int x=5;
printf("%d %d %d\n",x,x<<2,x>>2);
}
what is the output? | Ramco | 7 |
| swap two integer variables without using a third temporary
variable? | | 2 |
| declare afunction pointer to int printf(char *)? | HCL | 1 |
| i want to know aptitude questions,technical questions | | 2 |
| sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2;
Find the value of x? | Subex | 2 |
| What is the diffences between Windows XP and Windows Visa
| Aricent | 1 |
| main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}
| CitiGroup | 17 |
| what will be the result of the following program ?
char *gxxx()
{
static char xxx[1024];
return xxx;
}
main()
{
char *g="string";
strcpy(gxxx(),g);
g = gxxx();
strcpy(g,"oldstring");
printf("The string is :
%s",gxxx());
}
a) The string is : string
b) The string is :Oldstring
c) Run time error/Core dump
d) Syntax error during compilation
e) None of these
| IBM | 2 |
| WRITE A C PROGRAM TO FIND SECOND BIGGEST VALUE FROM THE
GIVEN VALUES | | 1 |
| struct ptr
{
int a;
char b;
int *p;
}abc;
what is d sizeof structure without using "sizeof" operator?? | Verifone | 8 |
| two progs are given. one starts counting frm 0 to MAX and
the other stars frm MAX to 0. which one executes fast.
| Verifone | 5 |
| i want the code for printing the output as follows
4 4
3 3
2 2
1 1
0
1 1
2 2
3 3
4 4 | | 1 |
| what is the differnce between AF_INET and PF_INET? | Wipro | 2 |
| what is the difference between c and java? | | 1 |
| what is the difference between getch() and getchar()? | | 5 |
| how to display 2-D array elements in spiral | | 1 |
| What will be printed as the result of the operation below:
#include<..>
int x;
int modifyvalue()
{
return(x+=10);
}
int changevalue(int x)
{
return(x+=1);
}
void main()
{
int x=10;
x++;
changevalue(x);
x++;
modifyvalue();
printf("First output:%d\n",x);
x++;
changevalue(x);
printf("Second output:%d\n",x);
modifyvalue();
printf("Third output:%d\n",x);
} | | 2 |
| Why preprocessor should come before source code?
| | 2 |
| code for copying two strings with out strcpy() function. | | 5 |
| write an algorithm which can find the largest number among
the given list using binary search ...............
this was asked in the interview | Satyam | 2 |
| |
| For more C Interview Questions Click Here |