Font size
WorksheetsQuiz on Air Pool 1 SH
Total questions: 21
Worksheet time: 17mins
How do we store a negative integer?
One's Compliment
Two's Compliment
Zero's Compliment
None of the above
What will happen to the program in the absence of a main()?
Compilation Error
Syntax Error
No Error. Program will not be executed
Program will execute normally
Which of the following best defines a class?
Parent of an object
Instance of an object
Scope of an object
Blueprint of an object
Which header file is required in C++ to use OOP?
iostream.h
No Header File Needed
stdio.h
stdlib.h
In C++, a collection of generic class and function is called as
Function template
Header file
Standard Template Library (STL)
None of the Above
Function overloading do not depend on
number of parameter
return values
order of parameter
differ in type of parameter
Which of the following cannot be static in C?
Variables
Functions
Structures
None of the Above
What symbol is used to Left-Justify within the data given field width in printf()?#0
-(minus sign)
+ (plus sign)
#
0
In printf(), if by mistake you specify more number of arguments, the excess arguments will
produce compile error
produce run-time error
be ignored
produce logical error
In C, if you pass an array as an argument to a function, what actually gets passed?
Value of elements in array
Base address of the array
First element of the array
Address of the last element of array
What function should be used to free the memory allocated by calloc() ?
dealloc();
malloc(variable_name, 0)
free();
memalloc(variable_name, 0)
Comment on the following pointer declaration: int *ptr, p;
ptr is a pointer to integer, p is not.
ptr and p, both are pointers to integer.
ptr is pointer to integer, p may or may not be.
ptr and p both are not pointers to integer.
Input/output function prototypes and macros are defined in which header file?
conio.h
stdlib.h
stdio.h
dos.h
Does there any function exist to convert the int or float to a string in C?
Yes
No
Which statement will you add in the following program to work it correctly?
#include<stdio.h>
int main()
{
printf("%f\n", log(36.0));
return 0;
}
#include<conio.h>
#include<math.h>
#include<stdlib.h>
#include<dos.h>
What is the similarity between a structure, union and enumeration?
All of them let you define new values
All of them let you define new data types
All of them let you define new pointers
All of them let you define new structures
Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?
rem = 3.14 % 2.1;
rem = modf(3.14, 2.1);
rem = fmod(3.14, 2.1);
Remainder cannot be obtain in floating point division.
Clara is writing a program that will print out the first ten numbers of a times table (chosen by the user). Should she use
a FOR loop
a WHILE loop
We can not declare a multiple function with same name?
True
False
How many times will the following loop execute?
for(j = 1; j <= 10; j = j-1)
Infinite Loop
11
0
Never
Do share your valuable feedback!
