-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
4
5
6
Undefined
throws
throw
threw
thrown
Call by reference
Call by value
Call by reference by passing base address to a function
Both A and C
results in a syntax error
output Infomax7
outputs garbage
outputs infomax and terminates abruptly
signed short
unsigned short
long
int
getchar()
gets()
scanf()
cin.get()
* / % + - =
= * / % + -
/ * % - + =
* % / - + =
stdio.h
conio.h
stdlib.h
None of these
How many times will the following loop execute?
int j;for(j = 1; j <= 10; j = j-1)printf("INFOMAX");
Forever
Never
0
10
Spaces
Digits
Underscores
Letters
Using malloc() without free()
Using calloc() without realloc()
Using pointers incorrectly
None of the above
float
double
long double
far double
What will be the output of the following code?
int main(){int x,y,z;x='1'-'0'; /* line-1 */y='a'-'b'; /* line-2 */z=x+y;printf("%d",z);}
Error because of incorrect line-1 only.
Error because of incorrect line-1 and line-2.
Error because of incorrect line-2 only.
malloc()
free()
calloc()
realloc()
Deriving a base class from derived class
Deriving a derived class from base class
Deriving a derived class from more than one base class
None of the mentioned
When the following piece of code is executed, what happens?
b = 3;a = b++;
a contains 3 and b contains 4
a contains 4 and b contains 4
a contains 4 and b contains 3
a contains 3 and b contains 3
for (i=1; i < 20; i++) printf ("k");
for (i=1; i = 20; i++) printf ("k");
for (i=0; i < 20; i++) printf ("k");
for (i=0; i <= 20; i++) printf ("k");
return
static
new
volatile
Read
Write
Execute
Copy
*
+
++
&&
It is used to define global variables
It is used to define a macro
It is used to include standard or user-defined header files in the program
It is used to include comments in the code
int func();
func() int;
function int func();
declare int func();
Nested structure
Recursive structure
Union structure
Inline structure
What is the output of the following code?
int a = 5, b = 10;if (a < b)printf("a is less than b");elseprintf("a is greater than or equal to b");
a is greater than or equal to b
a is less than b
Compiler Error
What is the final value of x when the code is executed?
int x; for(x=0; x<10; x++) {}
9
1
for (int i = 0; i < 10; i++)
for i = 0 to 10 step 1
for (i = 0; i < 10; i++)
for (i < 10; i++)
char
switch
goto
go back
Algorithm
Flow-Charts
Procedural
Object Oriented
Both can occur multiple times, but a declaration must occur first.
A definition occurs once, but a declaration may occur many times.
Both can occur multiple times, but a definition must occur first.
A declaration occurs once, but a definition may occur many times.
It returns the size of the variable in bits
It returns the size of the variable in bytes
It returns the size of the variable in kilobytes
It returns the number of elements in an array
It breaks out of both loops.
It only breaks out of the innermost loop.
It causes a compile-time error.
It stops the program.
break stops the loop, continue skips the rest of the iteration
Both stop the loop
break skips to the next iteration, continue exits the loop
Both skip to the next iteration
Calm
Rough
Hard
Still
An array of characters
The object of some class
Same as other primitive data type
Linkedlist of characters
immutable
mutable
const
Raj says, “He wants ice cream”
Raj had said, “He wants an ice-cream”
Raj will say, “I want an ice-cream”
Raj said, “I want an ice-cream”
LowerCase letters
UpperCase letters
CamelCase letters
Consider the following code and How many bytes of memory will be allocated?
int *ptr = (int *)malloc(10 * sizeof(int));
10 bytes
20 bytes
80 bytes
40 bytes
function(int ptr);
function(int *ptr);
function(*ptr);
function(ptr *int);
is executed only once if the condition is true.
is also known as entry-controlled loop.
is executed at least once if the condition is false.
is unconditional looping statement..
real
compare two numeric values
combine two numeric values
compare two boolean values
Id_No
ID_NO
IdNo
Id No
int arr[5] = {1, 2, 3, 4, 5};printf("%d", arr[3]);
2
3
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
8
16
for loop
while loop
do-while loop
none of the above
Book
Cat
Happiness
Table