You are on page 1of 5

MCQs for C Language

Chapter 1: Introduction of logic and development tools


1. Textual representation of a program is called what?
(a) Algorithm (b) Flowchart (c) Dry run (d) None of these
2. Graphical representation of a program is called what?
(a) Algorithm (b) Flowchart (c) Dry run (d) None of these
3. Sample calculation of an algorithm/flowchart is called what?
(a) Algorithm (b) Flowchart (c) Dry run (d) diamond
4. To denote process in flowchart which symbol is used?
(a) rectangle (b) ellipse (c) aero (d) diamond
5. To denote flow in flowchart which symbol is used?
(a) rectangle (b) ellipse (c) aero (d) diamond
6. To take decision in flowchart which symbol is used?
(a) rectangle (b) ellipse (c) aero (d) diamond

Chapter 2: Introduction of C language
1. In which language there is only one meaning of each instruction?
(a) Programming (b) Natural (c) Symbolic (d) Numeric
2. Who does not understand natural of programming language directly?
(a) Compiler (b) Monitor (c) Director/Manager (d) User
3. Which function is compulsory in every C program?
(a) pritnf() (b) printf (c) main() (d) main
4. What is C program?
(a) Structures (b) Group of functions (c) Group of codes (d) Group of instructions
5. In documentation every sentence is put between what?
(a) <* *> (b) /* */ (c) (* *) (d) [* *]
6. Normally in what symbolic constant is written?
(a) in capital letter (b) in small letter (c) in numeric (d) in special font
7. What is the extension of header file?
(a) .hed (b) .hd (c) .h (d) .d
8. Which variable can not be used outside its scope?
(a) Local variable (b) Global variable (c) Constant (d) Bi-variable
9. There is a facility to divide C language program into small parts, What do these parts called?
(a) Command (b) Function (c) Instruction (d) Details
10. What is required to be learnt before learning new language?
(a) Words (b) Syntax (c) Character set (d) Grammer
11. How many keywords are there in C?
(a) 34 (b) 32 (c) 2 (d) 4
12. The C language started in which laboratory?
(a) Bell (b) Pell (c) Tel (d) Well
13. How much memory is occupied by float data type?
(a) 2 Byte (b) 6 Byte (c) 4 Byte (d) 8 Bytes

Chapter 3: Control structures
1. With which another name decision structure is known as?
(a) Selective structure (b) Result structure (c) Primary structure (d) Ultimate structure
2. How many statements C provides under selective structure?
(a) One (b) Three (c) Four (d) Two
3. When if statement is used in another if statement what is it called?
(a) if.else (b) switch (c) nested if (d) if
4. In C by which name multi-way decision statement is known as?
(a) simple if (b) switch (c) if.else (d) nested if
5. In switch option at the end of case label which sign is put?
(a) / (b) , (c) : (d) *
6. In C language how many loop control statements are available?
(a) One (b) Two (c) Three (d) Four
7. ANSI C approves how many maximum case labels?
(a) 257 (b) 275 (c) 260 (d) 259
8. When in the program some statements are required to be implemented repeatedly, which structure is
used?
(a) loop control (b) function structure (c) decision structure (d) control structure
9. Break statement is known as by which another name?
(a) Exit loop (b) Close Loop (c) Quit Loop (d) Escape Loop
10. Which statement is used to skip following statement of the loop?
(a) break statement (b) continue statement (c) if statement (d) exit statement

Chapter 4: Functions
1. Normally in C language how many types of functions are available?
(a) Two (b) Three (c) Four (d) Five
2. What is called the function already available in compiled form in C language?
(a) statement function (b) library function (c) main function (d) data function
3. Which file has to be included to make use of library function?
(a) Header file (b) footer file (c) Data file (d) Character file
4. Which function is used to use the function, one defined?
(a) Library function (b) Single function (c) Calling function (d) Statement function
5. Which type of function is included in header file <math.h>?
(a) for testing and converting characters (b) Mathematical function
(c) To convert string (d) To work with the string
6. Which type of function is included in header file <ctype.h>?
(a) for testing and converting characters (b) Mathematical function
(c) To convert string (d) To work with the string
7. Which type of function is included in header file <stdio.h>?
(a) Standard library I/O function (b) Mathematical function
(c) To convert string (d) To work with the string
8. Which type of function is included in header file <string.h>?
(a) To convert string (b) Mathematical function
(c) String manipulation function (d) To work with the string
9. Which type of function is included in header file <time.h>?
(a) To convert string (b) Mathematical function
(c) String manipulation function (d) Time manipulation function
10. With the help of what the data is passed on to called function from calling function?
(a) String (b) Integer (c) Character (d) Argument

Chapter 5: Arryas in C
1. Group of elements having same datatypes is called what ?
(a) Library (b) Array (c) Numeric (d) Alphabetic
2. In how many parts array can be divided?
(a) Two (b) Three (c) Four (d) Five
3. What is called array having single raw and one column?
(a) Single array (b) Double array (c) Multi-dimensional array
(d) single-dimensional array
4. What is called the array with one or more than one raw or more than one column?
(a) Multi array (b) Multi-dimensional array (c) Single array
(d) Single-dimensional array
5. In how many ways the elements of array can be assigned value?
(a) Two (b) One (c) Three (d) Four
6. What is called the valid subscript out of 0 to 9 elements of array?
(a) Index (b) Post index (c) Value (d) Variable
7. With the use of which variable each array elements is accessed?
(a) superscript (b) asubscript (c) subscript (d) integer
8. When the elements of array can be assigned values?
(a) after compiler (b) before compiler (c) at the time of compilation (d) compiler
9. In C language character array is considered as what?
(a) integer (b) number (c) compiler (d) string
10. How is the size of the array?
(a) optional (b) limited (c) compulsory (d) voluntary

Chapter 6: Structures
1. To declare a structure which keyword is used?
(a) struc (b) structure (c) struct (d) stru
2. Structure member is used using which operator?
(a) . (b) + (c) & (d) ,
3. What is the similarity between a structure and union?
(a) Both of them let you define new values (b) Both of them let you define new data types
(c) Both of them let you define new pointers (d) Both of them let you define new structures
4. Which function is used to free the allocated memory?
(a) remove() (b) malloc() (c) free() (d) calloc
5. Which one of the following is a memory allocation function?
(a) calloc() (b) printf() (c) dalloc() (d) maloc()
6. Which function is used to dynamically allocate memory?
(a) alloc() (b) memalloc() (c) malloc() (d) None of these

Chapter 7: Pointers in C
1. A pointer is
(a) A keyword used to create variables (b) A variable that stores address of an instruction
(c) A variable that stores address of other variable (d) All of the above
2. The operator used to get value at address stored in a pointer variable is
(a) * (b) & (c) && (d) ||
3. The operators used with pointers are.?
(a) + and / (b) & and + (c) & and * (d) All of the above
4. Which one is the address operator in following?
(a) & (b) && (c) * (d) +
5. Which of the following operator is not used with pointers?
(a) * (b) & (c) -> (d) >>
6. Which operation is not allowed on pointers?
(a) Incrementing a pointer variable (b) Adding a number to pointer variable
(c) difference of two pointer variables (d) multiplication of pointer variable by number
7. With the use of pointer program execution becomes?
(a) Faster (b) Slower (c) Remains same (d) None of these
8. In C a pointer variable to an integer can be created by the declaration..
(a) int p* (b) int *p (c) int +p (d) int $p


Chapter 8: File handling in C
1. To open a file which function is used?
(a) fopen() (b) fclose() (c) fread() (d) fseek
2. To close a file which function is used?
(a) fopen() (b) fclose() (c) fread() (d) fseek
3. Which function returns the current pointer position in the file?
(a) fopen() (b) fgetc() (c) ftell() (d) fseek
4. To write data into the file which function is used?
(a) printf() (b) fprintf() (c) scanf() (d) fsanf()
5. To read data from file which function is used?
(a) printf() (b) fprintf() (c) scanf() (d) fsanf()
6. To write a single character into the file which function is used?
(a) fputc() (b) fgetc() (c) scanf() (d) fsanf()
7. To read a single character from file which function is used?
(a) fputc() (b) fgetc() (c) scanf() (d) fsanf()
8. To open a file in read only mode which parameter is used?
(a) r (b) w (c) a (d) r+
9. To open a file in write only mode which parameter is used?
(a) w+ (b) w (c) a (d) r+
10. To open a file in read and write mode which parameter is used?
(a) r (b) w (c) a (d) r+

You might also like