Here you can find C Multiple Choice Questions and Answers.
In this C Multiple Choice Questions and Answers section you can learn and practice C Multiple Choice Questions and Answers to improve your skills in order to face technical inerview conducted by Banks. By Practicing these interview questions, you can easily crack any Bank Exams interview.
AllIndiaExams provides you lots C Multiple Choice Questions and Answers with proper explanation. Fully solved examples with detailed answer description. All students, freshers can download C Multiple Choice Questions and Answers as PDF files and eBooks.
You no need to worry, we have given lots of C Multiple Choice Questions and Answers and also we have provided lots of FAQ's to quickly answer the questions in the Bank Exams interview.
1. Property which allows to produce different executable for different platforms in C is called?
2. #include is called
3. C preprocessors can have compiler specific features.
4. C preprocessor is conceptually the first step during compilation.
5. Preprocessor feature that supply line numbers and file names to compiler is called?
1. What is the output of this C code? int main() { int x = 2, y = 0; int z = (y++) ? y == 1 && x : 0; printf("%d\n", z); return 0; }
2. What is the output of this C code? int main() { int x = 1; int y = x == 1 ? getchar(): 2; printf("%d\n", y); }
3. What is the output of this C code? int main() { int x = 1; short int i = 2; float f = 3; if (sizeof((x == 2) ? f : i) == sizeof(float)) printf("float\n"); else if (sizeof((x == 2) ? f : i) == sizeof(short int)) printf("short int\n"); }
4. What is the output of this C code? int main() { int a = 2; int b = 0; int y = (b == 0) ? a :(a > b) ? (b = 1): a; printf("%d\n", y); }
5. What is the output of this C code? int main() { int y = 1, x = 0; int l = (y++, x++) ? y : x; printf("%d\n", l); }
1. What is the output of this C code? int main() { enum {ORANGE = 12, MANGO, BANANA = 11, APPLE}; printf("APPLE = %d\n", APPLE); }
2. What is the output of this C code? int main() { printf("C programming %s", "Class by\n%s AllIndiaExams", "SUPER"); }
3. For the following code snippet: char *str = “AllIndiaExams.in\0? “training classesâ€; The character pointer str holds reference to string:
4. What is the output of this C code? #define a 20 int main() { const int a = 50; printf("a = %d\n", a); }
5. What is the output of this C code? int main() { int var = 010; printf("%d", var); }
1. Comment on the output of this C code? int main() { int a[5] = {1, 2, 3, 4, 5}; int i; for (i = 0; i < 5; i++) if ((char)a[i] == '5') printf("%d\n", a[i]); else printf("FAIL\n"); }
2. The format identifier ‘%i’ is also used for _____ data type?
3. Which data type is most suitable for storing a number 65000 in a 32-bit system?
4. Which of the following is a User-defined data type?
5. What is the size of an int data type?
1. What is the output of this C code? void foo(const int *); int main() { const int i = 10; printf("%d ", i); foo(&i); printf("%d", i); } void foo(const int *i) { *i = 20; }
2. Comment on the output of this C code? int main() { const int i = 10; int *ptr = &i; *ptr = 20; printf("%d\n", i); return 0; }
3. What is the output of this C code? int main() { j = 10; printf("%d\n", j++); return 0; }
4. Does this compile without error? int main() { for (int k = 0; k < 10; k++); return 0; }
5. Does this compile without error? int main() { int k; { int k; for (k = 0; k < 10; k++); } }
1. The first and second arguments of fopen are?
2. For binary files, a ___ must be appended to the mode string.
3. If there is any error while opening a file, fopen will return?
4. Which is true about getc.getc returns?
5. When a C program is started, O.S environment is responsible for opening file and providing pointer for that file?
1. What is the output of this C code? int main() { char *p = NULL; char *q = 0; if (p) printf(" p "); else printf("nullp"); if (q) printf("q\n"); else printf(" nullq\n"); }
2. What is the output of this C code? int main() { int i = 10; void *p = &i; printf("%d\n", (int)*p); return 0; }
3. What is the output of this C code? int main() { int i = 10; void *p = &i; printf("%f\n", *(float*)p); return 0; }
4. What is the output of this C code? int *f(); int main() { int *p = f(); printf("%d\n", *p); } int *f() { int *j = (int*)malloc(sizeof(int)); *j = 10; return j; }
5. What is the output of this C code? int *f(); int main() { int *p = f(); printf("%d\n", *p); } int *f() { int j = 10; return &j; }
1. Which among the following is odd one out?
2. For a typical program, the input is taken using.
3. What does the following command line signify?
4. What is the default return-type of getchar()?
5. The value of EOF is_____.
1. The function ____ obtains block of memory dynamically.
2. void * malloc(size_t n) returns:
3. calloc() returns a storage that is initialized to.
4. In function free(p), p is a:
5. What is the output of this C code? void main() { char *p = calloc(100, 1); p = "welcome"; printf("%s\n", p); }
1. The correct syntax to use typedef for struct is.
2. For the following expression to work, which option should be selected. string p = “HELLOâ€;
3. Which of the given option is the correct method for initialization? typedef char *string;
4. Which of the following is FALSE about typedef?
5. typedef which of the following may create problem in the program?
1. C99 standard guarantees uniqueness of ____ characters for internal names.
2. C99 standard guarantess uniqueness of _____ characters for external names.
3. Which of the following is not a valid variable name declaration?
4. Which of the following is not a valid variable name declaration?
5. Variable names beginning with underscore is not encouraged. Why?
1. Which of the following are themselves a collection of different data types?
2. User-defined data type can be derived by___________.
3. Which operator connects the structure name to its member name?
4. Which of the following cannot be a structure member?
5. Which of the following structure declaration will throw an error?
1. What is the output of this C code? int main() { void foo(), f(); f(); } void foo() { printf("2 "); } void f() { printf("1 "); foo(); }
2. What is the output of this C code? int main() { void foo(); void f() { foo(); } f(); } void foo() { printf("2 "); }
3. What is the output of this C code? void foo(); int main() { void foo(); foo(); return 0; } void foo() { printf("2 "); }
4. What is the output of this C code? void foo(); int main() { void foo(int); foo(1); return 0; } void foo(int i) { printf("2 "); }
5. What is the output of this C code? void foo(); int main() { void foo(int); foo(); return 0; } void foo() { printf("2 "); }
1. Comment on the output of this C code? int main() { int a[5] = {1, 2, 3, 4, 5}; int i; for (i = 0; i < 5; i++) if ((char)a[i] == '5') printf("%d\n", a[i]); else printf("FAIL\n"); }
2. The format identifier ‘%i’ is also used for _____ data type?
3. Which data type is most suitable for storing a number 65000 in a 32-bit system?
4. Which of the following is a User-defined data type?
5. What is the size of an int data type?
1. What is the output of this C code? int main() { int i = -5; int k = i %4; printf("%d\n", k); }
2. What is the output of this C code? int main() { int i = 5; int l = i / -4; int k = i % -4; printf("%d %d\n", l, k); return 0; }
3. What is the output of this C code? int main() { int i = 7; i = i / 4; printf("%d\n", i); return 0; }
4. What is the value of x in this C code? void main() { int x = 4 *5 / 2 + 9; }
5. What is the output of this C code? void main() { int x = 4.3 % 2; printf("Value of x is %d", x); }
1. Which keyword can be used for coming out of recursion?
2. What is the output of this C code? int main() { int a = 0, i = 0, b; for (i = 0;i < 5; i++) { a++; continue; } }
3. What is the output of this C code? int main() { int a = 0, i = 0, b; for (i = 0;i < 5; i++) { a++; if (i == 3) break; } }
4. The keyword ‘break’ cannot be simply used within:
5. Which keyword is used to come out of a loop only for that iteration?
Online Test Name | C |
Exam Type | Multiple Choice Questions |
Category | Computer Science Engineering Quiz |