0% found this document useful (0 votes)
47 views

C Language - DMCA

This document contains a sample C programming exam with four parts - multiple choice questions, true/false questions, matching questions, and fill in the blank questions. The exam tests fundamental C programming concepts like data types, operators, functions, pointers, structures, unions, preprocessor directives, and I/O functions.

Uploaded by

Pawan Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

C Language - DMCA

This document contains a sample C programming exam with four parts - multiple choice questions, true/false questions, matching questions, and fill in the blank questions. The exam tests fundamental C programming concepts like data types, operators, functions, pointers, structures, unions, preprocessor directives, and I/O functions.

Uploaded by

Pawan Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

OCT 2022

C Programming
Course Code: DMCA
NOTE:
1. There are four parts in this module/paper. This module contains MCQ, true/false & fills in the blanks or
match making questions.
2. All questions are compulsory
3. Don’t use whitener/correction pen.
4. No number will be given for overwriting or cutting

1. Multiple Choices. (1X20)

1) We can determine the size of a union with the help of the size
of __________?
12) Why C is low level language?
a) The sum of all the members’ sizes a) Old language b) easy to learn
b) The biggest member of the union ? c) Work closely with machine d) none of above
c) The last member of the union
d) The first member of the union 13) What does flowchart represent in an algorithm?
2 We can achieve the modulus for float by? a) execution b) statement
a) x % y c) program d) graphical
b) modulus(x, y);
c) fmod(x, y); 14) Which symbol being used in decision point in a flowchart?
d) mod(x, y); a) Circle b) diamond
c) rectangle d) parallelogram
3)Which keyword is used to prevent any changes in the variable
within a C program? 15) Choose a correct statement about C structures.
a) immutable b) mutable a) A structure enables display of folder structure in OS. B) A
c) const d) volatile structure enables erasing contents in a folder in OS.
c) A structure enables to detect and respond to mouse clicks.
4) What is the size of double data type? d) All the above
a) 1 b) 4
c) 8 d) None of Above 16) Which of the application does C originally developed?
a) Gamming b) Remote control
5) Which symbol define the end of a statement? c) Window OS d) Unix OS
a) colon b) Semi-Colon
c) back-slash d) none of above 17) #include<stdio.h> what .h represent?
a) hash b) home
6) Which of the following is a reference data type? c) header file d) none of Above
a) Int b) float
c) double d) String 18) What does conio.h represent?
a) console Input/Output b) connect Input/Output
7) sizeof() function uses which type of format specifier? c) constructor Input/output d) class Input/output
a) %d b) %f
c) %lf d) none of above 19) What is the primary purpose of the preprocessor directive
#error?
8) Which of the following keyword in C let’s remain in loop, but a) Rectifies the first error occuring in the code
skip ahead to the next iteration? b) Rectifies the errors present in a code
a) break b) goto c) Causes a preprocessor to ignore any error
c) continue d) none of above d) Causes a preprocessor to report some fatal error

9) Which of the following is the reference data type? 20) What is the C function used to move current pointer to the
a) int b) union beginning of file : FILE *fp;?
c) double d) char a) rev(fp)
b) rewind(fp)
10) Which keyword used to declare local variable to global c) rew(fp)
variable? d) wind(fp)
a) const b) global
c) static d) none of above

11) What is the need for closing a file in C language?


a) close(fp) closes a file to release the memory used in opening a
file.
b )Closing a file clears Buffer contents from RAM or memory.
c) Unclosed files occupy memory and PC hangs when on low
memory.
d) All the above
OCT 2022

2. TRUE OR FALSE (1 X 10)

1) If statement is an example of iteration in C.


2) Functions can return enumeration constants in C.
3) String is a primitive data type.
4) // is used for single line comments.
5) #include<stdio.h> gives you the function getch();
6) A union allows storing different data types in the same memory location.
7) typedef is commonly used with structures.
8) The members of a structure may also be structures.
9) A recursive function does not includes a base case, or exit condition.
10) Variables declared in a function are global to that block of code and cannot be referred to outside the function.
3. Match words and phrases in column X with the closest related meaning/words(s) phrases(s) in column Y.:
(1X10)
X Y
1 Pointer A A variable used to store address of other variable
2 C is a which level language.? B Division by 2
3 A C program is a combination of. C MOD
4 tolower() D High Level
5 exit(0) E converts a uppercase alphabet to an lowercase
alphabet.
6 Constants F Declare a function
7 % G Exit program
8 reading in a multi-word string H Fixed values
9 Right Shift operation >> is equivalent to I gets()
10 The prototype of a function can be used to, J Statements, Functions, Variables

4. Fill in the Blanks (1 X 10)

1) _____________ is a condition in which the memory is dynamically reserved but isn’t accessible to any program.
2) __________ tells a compiler that the data would be defined somewhere and it would be connected to the linker.
3) ___ header file can be used to define input/output function prototypes and macros.
4) C is a __level language.
5) Initially C language was developed to be used in __operating System.
6) A string in C is an array of characters that ends with a NULL character.
7) Turbo C++ uses the compiler called ___.
8) Structure uses the type definition called __.
9) __ is the keyword to set the constant of variable.
10) An __ is a data structure that stores a collection of related values that are all the same type.

You might also like