no of students
char
7th
myName
10
20
0
None
What is the final value of x when the code is executed?
int x; for(x=0; x<10; x++) {}
9
1
Id_No
ID_NO
IdNo
Id No
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..
Value of elements in array
First element of the array
Base address of the array
Address of the last element of array
2.5
2
2.000000
2.500000
break
exit(0)
abort()
All of the mentioned
Nested structure
Recursive structure
Union structure
Inline structure
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
int num;
integer num;
num int;
num integer;
print()
scanf()
input()
All of the above
exit
continue
return
arr[2]
arr(2)
arr[3]
arr[1]
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 be the output of the following pseudo code ?
Integer aSet a =4do print a + 2 a = a-1while (a not equals 0)end while
6 6 6 6
6 5 4 3
6 7 8 9
6 8 10 12
int a(char *s)
void b(int a[], int n)
float *c()
short d(long x)
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
What will be the output of the following code?
int a = 10, b = 20;printf("%d", a + b);
30
1020
10+20
Compiler error
Spaces
Digits
Underscores
Letters
static
new
volatile
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
conio.h
string.h
math.h
graphic.h
getchar()
gets()
cin.get()
An Editor
A compiler
An operating system
None of these
What is the output of the following code?
int arr[5] = {1, 2, 3, 4, 5};printf("%d", arr[3]);
3
4
power of y to the x
power of x to the y
logarithm of x on the base y
Such function does not exist
Martin Richards
Dennis Ritchie
Ken Thompson
Herman Hellorith
int x = 5;if (x > 3) { printf("Greater than 3"); } else { printf("Not greater than 3"); }
Greater than 3
Not Greater than 3
Error
No Output
5
6
Undefined
Stack
CISC
RISC
Parallel
stdio.h
stdlib.h
Call by reference
Call by value
Call by reference by passing base address to a function
Both A and C
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 func();
func() int;
function int func();
declare int func();
Infinitely
Variable
char > int > float
int > char > float
char < int < double
double > char > int
//
/
#
/*
int x = 5;printf("%d", ++x);
7
float_int, keyword, A1
ANSI, ascii, cpu
valid, variable, name
None of the above
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
auto
case
main
default
char str[] = "Hello";
char str = "Hello";
string str = "Hello";
char str[] = {'H', 'e', 'l', 'l', 'o'};
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
No output
int a = 5;printf("%d", a == 5);
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");
fclose()
closefile()
fileclose()
endfile()
2 bytes
4 bytes
8 bytes
1 byte
8