C interview questions – page 3
2,130 questions. Tap “Show answer” to check yourself.
-
prototype of sine function.
-
#define min((a),(b)) ((a)
-
int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output?
-
proc() { static i=10; printf("%d",i); } If this proc() is called second time, what is the output?
-
int arr[] = {1,2,3,4} int *ptr=arr; *(arr+3) = *++ptr + *ptr++; Final contents of arr[]
-
In scanf h is used for
-
x=2,y=6,z=6 x=y==z; printf(%d",x)
-
int i =10 main() { int i =20,n; for(n=0;n
-
f=(x>y)?x:y a) f points to max of x and y b) f points to min of x and y c)error
-
which of the function operator cannot be over loaded a)
-
long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes
-
i=20,k=0; for(j=1;j
- Advertisement
-
HOW DO YOU HANDLE EXCEPTIONS IN C?
-
WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c file management?
-
Give the output for the following program. #define STYLE1 char main() { typedef char STYLE2; STYLE1 x; STYLE2 y; clrscr(); x=255; y=255; printf("%d %dn",x,y); }
-
#ifdef TRUE int I=0; #endif main() { int j=0; printf("%d %dn",i,j); }
-
What is the output for the following program #include main() { char a[5][5],flag; a[0][0]='A'; flag=((a==*a)&&(*a==a[0])); printf("%dn",flag); }
-
What is the output of the program given below #include main() { char i=0; for(;i>=0;i++) ; printf("%dn",i); }
-
What is the output of the following program #include main() { int i=0; fork(); printf("%d",i++); fork(); printf("%d",i++); fork(); wait(); }
-
What is the memory allocated by the following definition ? int (*x)[10];
-
What is the memory allocated by the following definition ? int (*x)();
-
What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); }
-
what is the difference between const char *p, char const *p, const char* const p
-
Write a program to interchange two variables without using the third variable?
- Advertisement
-
Write a routine that prints out a 2-D array in spiral order!
-
Write a program to compare two strings without using the strcmp() function
-
macros and function are related in what aspect? a)recursion b)varying no of arguments c)hypochecking d)type declaration
-
enum day = { jan = 1 ,feb=4, april, may} what is the value of may? a)4 b)5 c)6 d)11 e)none of the above
-
2.main { int x,j,k; j=k=6;x=2; x=j*k; printf("%d", x);
-
fn f(x) { if(x