Professional Documents
Culture Documents
U
NIT-1
INTRODUCTION TO C LANGUAGE, STATEMENTS
1 A_____is source-program text that the compiler does not break down into component elements. [B ]
A)Comments B)Tokens C)Keywords D)Identifiers
2 A ___is a sequence of characters beginning with a forward slash/asterisk combination (/*) [D ]
A) Keywords B)Identifiers C)Tokens D)Comments
3 ___________are words that have special meaning to the C compiler. [A ]
A) Keywords B)Identifiers C)Tokens D)Comments
4 How many keywords available in C) [A ]
A) 32 B)30 C) 33 D)31
5 ______are the names you supply for variables, types, functions, and labels in your program. [D ]
A)Comments B)Tokens C)Keywords D)Identifiers
6 ____ names must differ in spelling and case from any keywords. [B ]
A) Keywords B)Identifiers C)Tokens D)Comments
7 You cannot use ____ as identifiers. [C ]
A)Comments B)Tokens C)Keywords D)Identifiers
8 A ____is a number, character, or character string that can be used as a value in a program. [A ]
A) Constants B) Special characters C)Puctuations D) All
A____ is a sequence of characters from the source character set enclosed in double quotation
9 [B ]
marks (" ").
A) Comments B) String literals C) Keywords D) None
10 Which are used to store the value during the execution of a program? [A ]
A)Variables B) Memory C) Datatype D)RAM
11 ____is a combination of alphabets and digits. [B ]
A) Memory B) Variables C) Datatype D)RAM
12 Variable name should not make use _____. [C ]
A)Comments B)Tokens C)Keywords D)Identifiers
13 Variable name should not start with a ____. [C ]
A)Datatype B) Variable C)numbers D) all
14 How many byte can occupies character datatypes. [C ]
a. 2 bytes B)4 bytes C) 1 byte D) 8 bytes
15 How many byte can occupies integer datatypes. [A ]
A)2 bytes or 4 bytes B)4 bytes C) 1 byte D) 8 bytes
UNIT-2
ARRAYS, FUNCTIONS AND STRINGS
___________is defined as the collection of similar type of data items stored at contiguous [B ]
1
memory locations
A)Functions B)Arrays C)Pointers D)Strings
2 An array with two or more dimensions is called . [D ]
A)Array B) One-dimensional C) Two-Dimensional D) Multi-Dimensional
Array Array Array
________in C is an integer type constant or variable name whose value ranges from 0 to SIZE 1 [B ]
3
where SIZE is the total number of elements in the array
A)Array index B)Array subscript C)Both A & B D) None
4 ________in C are inbuilt functions [B ]
A)User Defined Functions B) Library functions C) Both A & B D)None
_______is a region of the program where a defined variable can have its existence and beyond [B ]
5
that variable it cannot be accessed)
A)Life time B)Scope C)Block D)All
6 The keywords which are used to modify the properties of a variable are called ____________ [A ]
A)type Qualifiers B)Scope C)global Variables D)Local variables
Variable is defined as __________, the program may not change the value of the variable [B ]
7
explicitly.
A)Constant B)Volatile C)Changable D)Adoptable
8 _________values can’t be modified by the program once they are defined) [A ]
A)constant B)volatile C)changable D)adoptable
9 ___________are defined as an array of characters. [C ]
A)structure B)union C)string D)integer array
10 clrscr() is a predefined function in _______________ standard Header file [D ]
A) <stdlib)h> B) <math.h> C) <stdio.h> D) <conio.h>
11 Sqrt() function is defined in __________________ header file [B ]
A) <stdlib)h> B) <math.h> C) <stdio.h> D) <conio.h>
12 Statements enclosed in a set of braces are called [A ]
A) Block B)string C)pointer D)All
13 ____Scope of object define in the global area is up to end of the program. [A ]
A)Global B)Local C)Static D)Public
14 Variable is define within the block are visible only in the block is called scope. [B ]
A)Global B)Local C)Static D)Public
15 The default storage class in C is called .
[C ]
UNIT-3
POINTERS, STRUCTURES AND UNION
4 Pointer is a [C ]
A) Function B) Array C)Variable D)Structure
5 Used to form complex data structures such as linked lists, graphs, trees. [D ]
A)Data types B)Functions C)Arrays D)Pointers
6 is an address of variable [A ]
A)Void pointers B)Null pointers C)Wild pointers D)All
7 Can be created by assigning a zero value during pointer declaration. [B ]
A)Void pointers B)Null pointers C)Wild pointers D)All
8 are the pointers that have not been initialized with something yet. [C ]
A)Void pointers B)Null pointers C)Wild pointers D)All
12 When we want to point at multiple variables or memories of the same data type [B ]
in c program, which is responsible
A)Function B)Array pointers C)Array D)All
13 Allocates single block of requested memory.
[A ]
The struct is a [ ]
32 [
]
A)Variable B)Functions C)Array D)Keyword
Keyword is used to provide some meaningful names to the already existing variable
36 in c language. [ ]
A)break B)auto C)typedef D)enum
enum is a [ ]
37
[ ]
A)Variable B)Function C)keyword D)array
is the user defined datatype that consists of integer values and it provides meaningful [ ]
38
names to these values
A)enum B)typedef C)continue D)goto
39 _____ is the User-defined data type which is a collection of different variables of different [ ]
datatypes in the same memory location
A)Union B)structure C)Array D)Pointer
40 Union is a ______ [ ]
A)Keyword B)variable C)Array D)Pointer
UNIT-4
UNIT-5
_______ is an operation or a technique that helps finds the place of a given element or value in [ ]
1
the list.
A)Sorting B)Searching C) Both A & B D)None
2 Searching techniques are ______ [ ]
A) Linear search B) Binary search C) Both A & B D)Data structure
In _________, we search an element or value in a given array by traversing the array from the [ ]
3
starting, till the desired element or value is found
A) Integrated Search B)Binary search C)Linear search D)Data structure
4 Linear search is applied on ______ [ ]
A) Sorted list B)Unsorted list C)Unordered list D)Both B & C
5 _________ is used with sorted array or list. [ ]
A) Table B)Binary search C)Linear search D)Data structure
_____________works by taking elements from the list one by one and inserting them in their [ ]
27
current position into a new sorted list.
A)Quick sort B)Bubble sort C)merge sort D)Insertion sort
28 Insertion sort consists of _______ passes [ ]
A)N-1 B)N+1 C)n-1 D)n+1
The _________ improves on the bubble sort by making only one exchange for every pass [ ]
29
through the list.
A)Quick sort B)merge sort C)selection sort D)Insertion sort
Which of the following sorting algorithm should be performed, which assignment operations [ ]
30
is minimized
A)Insertion sort B)Selection sort C)Quick sort D)None
31 Merge sort uses _______ approach. [ ]
A)Backtracking B)Divide and conquer C) Both A & B D)None
32 ______ function to perform the merging. [ ]
A)Swap() B)merge() C)add() D)fun()
33 ______ is a divide and conquer algorithm [ ]
A)merge sort B)selection sort C)Exchange sort D)Quick sort
34 ______ element is selected as first or last element in the list [ ]
A)pivot B)ordered C)unordered D) Both A & C
35 ____ is a pivot element. [ ]
A)L B)R C)k D)P
36 ____ is the left pointer in quick sort. [ ]
A)L B)R C)k D)P
37 ____ is the Right pointer in quick sort [ ]
A)L B)R C)k D)P
38 In quick sort , 6, 3, 7, 2, 4, 5. Pivot is greater than right side then _______________ [ ]
A)Move towards right B)swap P with R C)move towards left D)None
39 In quick sort, 6, 3, 7, 2, 4, 5. Pivot is greater than left side then______ [ ]
A)Move L towards right B)Swap P with R C)Move towards left D)Swap
40 In quick sort, final sorted list for 6, 3, 7, 2, 4, 5 [ ]
A)3,6,4,7,5,2 B)4,4,6,7,2 ,5 C)2,3,4,5,6,7 D) Both A & B