| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| could u able to tell about suresoft technical session | | 1 |
| #define MAX(x,y) (x) > (y) ? (x) : (y)
main()
{
int i = 10, j = 5, k = 0;
k = MAX(i++, ++j);
printf("%d %d %d", i,j,k);
}
what will the values of i , j and k?
}
| NDS | 9 |
| void main(int argc,char *argv[],char *env[])
{
int i;
for(i=1;i<argc;i++)
printf("%s",env[i]);
} | | 2 |
| which one is highest Priority in c?
a)=,b)+,c)++,d)== | | 3 |
| without using arithmatic operator convert an intger variable
x into x+1 | | 1 |
| how we can make 3d venturing graphics on outer interface | Microsoft | 1 |
| Write a C program to print 1 2 3 ... 100 without using
loops? | | 5 |
| Why the use of alloca() is discouraged?
| Oracle | 2 |
| When you call malloc() to allocate memory for a local
pointer, do you have to explicitly free() it? | | 2 |
| the format specified for hexa decimal is
a.%d
b.%o
c.%x
d.%u
| TCS | 4 |
| wats the diference btwen constant pointer and pointer to a
constant.pls give examples. | | 6 |
| what is the function of void main()? | | 6 |
| 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 |
| which of the following go out of the loopo if expn 2
becoming false
a.while(expn 1){...if(expn 2)continue;}
b.while(!expn 1){if(expn 2)continue;...}
c.do{..if(expn 1)continue;..}while(expn 2);
d.while(!expn 2){if(expn 1)continue;..}
| TCS | 2 |
| Determine if a number is a power of 2 at O(1). | | 1 |
| a memory of 20 bytes is allocated to a string declared as
char *s then the following two statements are executed:
s="Etrance"
l=strlen(s);
what is the value of l ?
a.20
b.8
c.9
d.21
| TCS | 4 |
| what is self refrential structure | HCL | 2 |
| What's the best way to declare and define global variables? | | 5 |
| why should i select you? | Wipro | 18 |
| int *p=20;
if u print like dis printf("%d",p);
o\p:- 20; how is it possible?
plz give me the explanation. | Global-Edge | 11 |
| |
| For more C Interview Questions Click Here |