Nested structure
Recursive structure
Union structure
Inline structure
Stack
CISC
RISC
Parallel
Binary operator
Unary operator
Ternary operator
All of the above
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.
function(int ptr);
function(int *ptr);
function(*ptr);
function(ptr *int);
print()
scanf()
input()
What is the final value of x when the code is executed?
int x; for(x=0; x<10; x++) {}
10
9
0
1
char str[] = "Hello";
char str = "Hello";
string str = "Hello";
char str[] = {'H', 'e', 'l', 'l', 'o'};
Algorithm
Flow-Charts
Procedural
Object Oriented
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
1return
return1
return
$return_1
Infinitely
Variable
signed short
unsigned short
long
int
4
8
16
compare two numeric values
combine two numeric values
compare two boolean values
None of the above
int func();
func() int;
function int func();
declare int func();
double
float
char
array
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
-1
2
break
continue
None of these
_infomax
3infomax
infomax_ica
infomax123
In the following nested conditional statements, which branch will execute?
int x = 4;if (x > 2) { if (x < 5) { printf("x is between 2 and 5"); }} else { printf("x is 2 or less");}
x is between 2 and 5
x is 2 or less
Error
No output
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
for loop
while loop
do-while loop
Continue
goto
exit
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
&
&&
||
!
What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a
<
=
>=
<=
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
Undefined
Decimal
Binary
Octal
Hexadecimal
What will be output if you compile and execute the following ‘C’ code?
void main(){int i=4,x;x=++i + ++i + ++i;printf("%d",x);}
21
18
19
Compilation error
Big a house
A house big
House big a
A big house
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
getchar()
gets()
cin.get()
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
The dog barked.
The cat chased the mouse.
The dog barked because it was hungry.
The cat chased the mouse, and the mouse ran away.
Value of elements in array
First element of the array
Base address of the array
Address of the last element of array
int arr[10][10];
int arr[10,10];
array int arr[10][10];
int arr{10}{10};
link, load, code, compile and execute
code, compile, link, execute and load
code, compile, link, load and execute
compile, code, link, load and execute
int arr[5] = {1, 2, 3, 4, 5};printf("%d", arr[3]);
3
arr[2]
arr(2)
arr[3]
arr[1]
An array of characters
The object of some class
Same as other primitive data type
Linkedlist of characters
"r"
"w"
"rw"
"read"
Id_No
ID_NO
IdNo
Id No
static
new
volatile
put together the file and functions that are required by the program
translate the instructions into a form suitable for execution by the program
load the executable code into the memory and execute them
allow the user to type the program
Read
Write
Execute
Copy