Interview questions
C interview questions – page 32
2,094 questions. Tap “Show answer” to check yourself.
-
It is not possible to debug the classes written in other .Net languages in a C# project.
-
Bool data type in C# is
-
If we want that any wildcard characters in the command line argument should be approxiemately expanded , are we required to make any special provision?if yes, which?
-
The following is the namespace used for Reflection:
-
Explain about parametric polymorphism?
-
Void main(){int const * p=5;printf("%d",++(*p));}
-
What would be the output of the following program? main() { int y=128; const int x=y; printf("%d",x); }
-
Main(){int i, j;scanf("%d %d"+scanf("%d %d", &i, &j));printf("%d %d", i, j);}
-
In the following code, in which order the functions would be called?x = f1(23,14)*f2(12/4)+f3();a) f1, f2, f3 b) f3, f2, f1c) The order may vary from compiler to compiler d) None of the above
-
Vii)7. main(){int i=-1,j=-1,k=0,l=2,m;m=i++&&j++&&k++||l++;printf("%d %d %d %d %d",i,j,k,l,m);}
-
Main(){int x=5;for(;x!=0;x--) {printf("x=%dn", x--);}}
-
Main(){char * strA;char * strB = I am OK;memcpy( strA, strB, 6);}
-
In which line of the following, an error would be reported? 1. #define CIRCUM(R) (3.14*R*R); 2. main() 3. { 4. float r=1.0,c; 5. c= CIRCUM(r); 6. printf("n%f",c); 7. if(CIRCUM(r))==6.28) 8. printf("nGobbledygook"); 9. }
-
GIVEN TWO ONE DIMENSIONAL ARRAYS A AND B WHICH ARE SORTED IN ASSCENDING ORDER.WRITE A PROGRAM TO MERGE THEM INTO A SINGLE SORTED ARRAY ,C THAT CONTAINS EVERY ITEM FROM ARRAYS A AND B,IN ASCENDING ORDER.
-
How would you use qsort() function to sort the name stored in an array of pointers to string?
-
Main(){int i, j, *p;i = 25;j = 100;p = &i; // Address of i is assigned to pointer pprintf("%f", i/(*p) ); // i is divided by pointer p}
-
In the following code, what is p2? typedef int* ptr ptr p1, p2;
-
What is the difference between null array and an empty array?
-
Union u{ struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i;}u;main(){ u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l);}
-
Main(){int i =10, j = 20;clrscr();printf("%d, %d, ", j-- , --i);printf("%d, %d ", j++ , ++i);}
-
Main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; }
-
Main(){char *a = "Hello ";char *b = "World";clrscr();printf("%s", strcat(a,b));}
-
Main(){int i=3;switch(i){default:printf("zero");case 1: printf("one");break;case 2:printf("two");break;case 3: printf("three");break;} }
-
Void main(){ float a= 0.7; if (a < 0.7) printf("c"); else printf("c++");} Output of the above program is c. Why? Whereas the same program with 0.8 instead of 0.7 gives c++ as the output? Why explain?
-
What is constructor and virtual function?
-
What is a satellite assembly?
-
Write a c program for delete a node from linked list?
-
Union u{union u{int i;int j;}a[10];int b[10];}u;main(){printf("n%d", sizeof(u));printf(" %d", sizeof(u.a));// printf("%d", sizeof(u.a[4].i));}
-
What is the output of the following program?#define SQR(x) (x*x)main(){ int a,b=3; a= SQR(b+2); printf("%d",a);}
-
Main(){char *a = "Hello ";char *b = "World";clrscr();printf("%s", strcpy(a,b));}