WorksheetsDS - QUIZ 1
Total questions: 20
Worksheet time: 10mins
Which of the following is a conditional statement?
Select
If
For
while
Which of the following cannot be checked in a switch-case statement?
Character
Integer
Float
enum
Which of the following data types can be used in a switch-case statement?
Boolean
Array
String
Double
What is the output of the following code snippet if the condition is true?
Error
False
True
Undefined
Which of the following statements is used to exit a loop prematurely?
Exit
Continue
Break
Return
The function that calls itself for its processing is known as
Inline Function
Nested Function
Overloaded Function
Recursive Function
Which data structure stores dissimilar data together?
Array
Stack
Structure
None of the above
The smallest element of an array's index is called its
Lower Bound
Upper Bound
Range
Extraction
Choose a correct statement about C language arrays.
An array size can not changed once it is created
Array element value cannot be changed
c) An array occupies memory discontinuously
c) None of the above
An array Index starts with.?
0
1
-1
2
How many bytes will an integer pointer moves when it is incremented?
1
2
4
8
Function used to allocate memory to an array at run time with Zero initial value?
malloc()
calloc()
realloc()
palloc()
What is the value of an array element which is not initialized.?
By default Zero 0
1
Depends on Storage Class
Depends on compiler
What happens when you try to access an array variable outside its Size.?
Compiler error is thrown
0 value will be returned
1 value will be returned
Returns garbage value
A multidimensional array of dimension N is a collection of.?
One Dimensional Arrays
N-1 dimensional arrays
N dimension arrays
N-2 dimension arrays
Choose a correct Syntax for malloc() function to allocate
memory to an array at run time.
int p; p = (int)malloc(10*sizeof(int));
int p; p = (int)malloc(10,sizeof(int));
c) int p; p = (int)malloc(sizeof(int), 10);
int p; p = (int)malloc(10*sizeof(int *));
What is the dimension of the C array int array[10][5].?
1
10
3
2
A mathematical-model with a collection of operations defined
on thatmodel is called
Data Structure
Abstract Data Type
Primitive Data Type
Algorithm
Representation of data structure in memory is known as
Recursive
Storage structure
File structure
Abstract Data Type
Which of the following is true about the characteristics of
abstract data types? i) It exports a type. ii) It exports a set of operations
True, False
False, True
True, True
False, False
