is executed only once if the conditions is true
is also known as entry-controlled loop
is executed at least once if the conditions is false
the unconditional loop
4 Bytes
8 Bytes
Depends on the system/compiler
Cannot be determined
-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
What will be the output of the following code?
int a = 10, b = 20;printf("%d", a + b);
30
1020
10+20
Compiler error
Stack
CISC
RISC
Parallel
-4
-2.8
+2.8
+3
Moves the file pointer to a specific location
Reads a file
Writes to a file
Closes a file
*
+
++
&&
arr[4]
arr(5)
arr[5]
arr[6]
infomax
info_max
info max
All of these
Algorithm
Flow-Charts
Procedural
Object Oriented
Decimal
Binary
Octal
Hexadecimal
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
0
1
-1
Depends on array size
scanf()
getch()
getche()
gets()
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
print("Hello World");
echo("Hello World");
printf("Hello World");
None of these
Return
GOTO
Switch
exit
<
=
>=
<=
What is the output of the following code?
int arr[5] = {1, 2, 3, 4, 5};printf("%d", arr[3]);
2
3
4
Depends on the system
Compilation error
Program will terminate with an error
Undefined behavior
Array index will wrap around
What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a
What will the following code print?
int x = 5;if (x = 0)printf("Zero");elseprintf("Not zero");
Zero
Not zero
Error
* / % + - =
= * / % + -
/ * % - + =
* % / - + =
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
Binary operator
Unary operator
Ternary operator
All of the above
return
static
new
volatile
true
friend
export
//
/
#
/*
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
float_int, keyword, A1
ANSI, ascii, cpu
valid, variable, name
None of the above
getchar()
cin.get()
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
Undefined
Nested structure
Recursive structure
Union structure
Inline structure
What is the final value of x when the code is executed?
int x; for(x=0; x<10; x++) {}
10
9
Call by reference
Call by value
Call by reference by passing base address to a function
Both A and C
float
double
long double
far double
final
constant
const
Value of elements in array
First element of the array
Base address of the array
Address of the last element of array
signed short
unsigned short
long
int
for loop
while loop
do-while loop
compare two numeric values
combine two numeric values
compare two boolean values
world
addition23
test-name
factorial
| |
!
include
char
What is the output of the following code:
int x = 5;
printf("%d", x++);
5
6
power of y to the x
power of x to the y
logarithm of x on the base y
Such function does not exist
It exits the current loop and continues with the next iteration
It terminates the current loop and transfers control to the next statement after the loop
It skips the current iteration and moves to the next iteration
It repeats the current iteration
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