<<= Back Next =>>
You Are On Multi Choice Question Bank SET 183

9151. What will be the output of the program? #include<stdio.h> void fun(int); typedef int (pf) (int, int); int proc(pf, int, int); int main() { int a=3; fun(a); return 0; } void fun(int n) { if(n > 0) { fun(--n); printf("%d,", n); fun(--n); } }





9152. What will be the output of the program? #include<stdio.h> int sumdig(int); int main() { int a, b; a = sumdig(123); b = sumdig(123); printf("%d, %d\n", a, b); return 0; } int sumdig(int n) { int s, d; if(n!=0) { d = n%10; n = n/10; s = d+sumdig(n); } else return 0; return s; }





9153. What will be the output of the program? #include<stdio.h> int main() { void fun(char); char a[100]; a[0] = 'A'; a[1] = 'B'; a[2] = 'C'; a[3] = 'D'; fun(&a[0]); return 0; } void fun(char a) { a++; printf("%c", a); a++; printf("%c", a); }





9154. What will be the output of the program? #include<stdio.h> int main() { int fun(int); int i = fun(10); printf("%d\n", --i); return 0; } int fun(int i) { return (i++); }





9155. What will be the output of the program? #include<stdio.h> int check (int, int); int main() { int c; c = check(10, 20); printf("c=%d\n", c); return 0; } int check(int i, int j) { int p, q; p=&i; q=&j; i>=45 ? return(p): return(q); }





9156. What will be the output of the program? #include<stdio.h> int fun(int, int); typedef int (pf) (int, int); int proc(pf, int, int); int main() { printf("%d\n", proc(fun, 6, 6)); return 0; } int fun(int a, int b) { return (a==b); } int proc(pf p, int a, int b) { return ((p)(a, b)); }





9157. What will be the output of the program? #include<stdio.h> int main() { int i=1; if(!i) printf("IndiaBIX,"); else { i=0; printf("C-Program"); main(); } return 0; }





9158. What will be the output of the program? #include<stdio.h> int addmult(int ii, int jj) { int kk, ll; kk = ii + jj; ll = ii jj; return (kk, ll); } int main() { int i=3, j=4, k, l; k = addmult(i, j); l = addmult(i, j); printf("%d %d\n", k, l); return 0; }





9159. What will be the output of the program? #include<stdio.h> int i; int fun1(int); int fun2(int); int main() { extern int j; int i=3; fun1(i); printf("%d,", i); fun2(i); printf("%d", i); return 0; } int fun1(int j) { printf("%d,", ++j); return 0; } int fun2(int i) { printf("%d,", ++i); return 0; } int j=1;





9160. What will be the output of the program? #include<stdio.h> int func1(int); int main() { int k=35; k = func1(k=func1(k=func1(k))); printf("k=%d\n", k); return 0; } int func1(int k) { k++; return k; }





9161. He .............. to arrive at 8 O’ clock, but he is late.





9162. What will be the output of the program? #include<stdio.h> int check(int); int main() { int i=45, c; c = check(i); printf("%d\n", c); return 0; } int check(int ch) { if(ch >= 45) return 100; else return 10; }





9163. If int is 2 bytes wide.What will be the output of the program? #include <stdio.h> void fun(char); int main() { char argv[] = {"ab", "cd", "ef", "gh"}; fun(argv); return 0; } void fun(char p) { char t; t = (p+= sizeof(int))[-1]; printf("%s\n", t); }





9164. What will be the output of the program? #include<stdio.h> int fun(int()()); int main() { fun(main); printf("Hi\n"); return 0; } int fun(int (p)()) { printf("Hello "); return 0; }





9165. What will be the output of the program? #include<stdio.h> int fun(int i) { i++; return i; } int main() { int fun(int); int i=3; fun(i=fun(fun(i))); printf("%d\n", i); return 0; }





9166. What will be the output of the program? #include<stdio.h> int fun(int); int main() { float k=3; fun(k=fun(fun(k))); printf("%f\n", k); return 0; } int fun(int i) { i++; return i; }





9167. What will be the output of the program? #include<stdio.h> #include<stdlib.h> int main() { int i=0; i++; if(i<=5) { printf("IndiaBIX"); exit(1); main(); } return 0; }




9168. Point out the error in the program f(int a, int b) { int a; a = 20; return a; }





9169. Point out the error in the program #include<stdio.h> int f(int a) { a > 20? return(10): return(20); } int main() { int f(int); int b; b = f(20); printf("%d\n", b); return 0; }





9170. Point out the error in the program #include<stdio.h> int main() { int a=10; void f(); a = f(); printf("%d\n", a); return 0; } void f() { printf("Hi"); }




9171. Which of the following statements are correct about the program? #include<stdio.h> int main() { printf("%p\n", main()); return 0; }





9172. There is a error in the below program. Which statement will you add to remove it? #include<stdio.h> int main() { int a; a = f(10, 3.14); printf("%d\n", a); return 0; } float f(int aa, float bb) { return ((float)aa + bb); }





9173. ‘മാലി’ എന്ന തൂലികാനാമത്തില്‍ അറിയപ്പെടുന്നത്? [‘maali’ enna thoolikaanaamatthil‍ ariyappedunnath?]





9174. Which of the following statements are correct about the function? long fun(int num) { int i; long f=1; for(i=1; i<=num; i++) f = f i; return f; }





9175. A function cannot be defined inside another function



9176. Functions cannot return more than one value at a time



9177. If return type for a function is not specified, it defaults to int



9178. In C all functions except main() can be called recursively.



9179. Functions can be called either by value or reference



9180. A function may have any number of return statements each returning different values.



9181. Names of functions in two different files linked together must be unique



9182. Functions cannot return a floating point number



9183. Every function must return a value



9184. If a function contains two return statements successively, the compiler will generate warnings. Yes/No ?



9185. Maximum number of arguments that a function can take is 12



9186. Will the following functions work? int f1(int a, int b) { return ( f2(20) ); } int f2(int a) { return (aa); }



9187. Usually recursion works slower than loops.



9188. Is it true that too many recursive calls may result into stack overflow?



9189. In a function two return statements should never occur.



9190. The keyword used to transfer control from a function back to the calling function is





9191. What is the notation for following functions? 1. int f(int a, float b) { / Some code / } 2. int f(a, b) int a; float b; { / Some code / }





9192. How many times the program will print "IndiaBIX" ? #include<stdio.h> int main() { printf("IndiaBIX"); main(); return 0; }





9193. Which of the following is most opposite in meaning to the word "veteran" ?





9194. It was Friday afternoon and the shops were full _____ customers.





9195. The officials of the Tourism Department are waiting at.......... railway to greet a new batch of American tourists





9196. Which files will get closed through the fclose() in the following program? #include<stdio.h> int main() { FILE fs, ft, fp; fp = fopen("A.C", "r"); fs = fopen("B.C", "r"); ft = fopen("C.C", "r"); fclose(fp, fs, ft); return 0; }





9197. On executing the below program what will be the contents of 'target.txt' file if the source file contains a line "To err is human"? #include<stdio.h> int main() { int i, fss; char ch, source[20] = "source.txt", target[20]="target.txt", t; FILE fs, ft; fs = fopen(source, "r"); ft = fopen(target, "w"); while(1) { ch=getc(fs); if(ch==EOF) break; else { fseek(fs, 4L, SEEK_CUR); fputc(ch, ft); } } return 0; }





9198. To scan a and b given below, which of the following scanf() statement will you use? #include float a; double b;





9199. Out of fgets() and gets() which function is safe to use?



9200. Consider the following program and what will be content of t? #include<stdio.h> int main() { FILE fp; int t; fp = fopen("DUMMY.C", "w"); t = fileno(fp); printf("%d\n", t); return 0; }





<<= Back Next =>>
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions