0
1
-1
Depends on array size
arr[4]
arr(5)
arr[5]
arr[6]
30
32
36
40
Id_No
ID_NO
IdNo
Id No
What will be the output of following program?
int main() { for(int c=1;c<5;++c); printf(“%d”,c); }
5
6
12345
Decimal
Binary
Octal
Hexadecimal
do-while
if-else
for
while
2 bytes
4 bytes
8 bytes
1 byte
What is the output of the following code:
int x = 5;
printf("%d", x++);
4
Undefined
Call by reference
Call by value
Call by reference by passing base address to a function
Both A and C
function(int ptr);
function(int *ptr);
function(*ptr);
function(ptr *int);
What will be output if you will compile and execute the following c code?
int main(){ int a=5; float b; printf("%d",sizeof(++a+b)); printf(" %d",a); return 0;}
2 6
4 6
2 5
4 5
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
*
&
%
#
strlen()
sizeof()
length()
strlength()
print()
scanf()
input()
All of the above
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
What is the output of the following code?
int arr[5] = {1, 2, 3, 4, 5};printf("%d", arr[3]);
2
3
Keywords can be used as variable names
Variable names can contain digits
Variable names do not contain blank spaces
Capital letters can be used in variable names.
malloc()
free()
calloc()
realloc()
Either True or False
is less than or is more than
is equal or less or more
Binary operator
Unary operator
Ternary operator
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();
LowerCase letters
UpperCase letters
CamelCase letters
None of these
int my_num = 100,000;
int my_num = 100000;
int my num = 1000;
int $my_num = 10000;
They can contain alphanumeric characters as well as special characters
It is not an error to declare a variable to be one of the keywords(like goto, static)
Variable names cannot start with a digit
Variable can be of any length
arr[2]
arr(2)
arr[3]
arr[1]
Stack
CISC
RISC
Parallel
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
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
An array of characters
The object of some class
Same as other primitive data type
Linkedlist of characters
switch
goto
go back
return
A number
A special symbol other than underscore
Both of the above
An alphabet
A
B
ADA
C++
start()
printf()
main()
getch()
1return
return1
$return_1
8
16
auto
case
main
default
int number;
float rate;
int variable_count;
int $main;
Input data
The program does not require any function.
Output data
The program must have at least one function.
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
To determine which operator evaluated first from left to right.
To determine the level of an operator in a program.
To determine how an expression involving more than one operator is evaluated.
To check the expression is valid or not.
compare two numeric values
combine two numeric values
compare two boolean values
None of the above
System programming language
General purpose language
Data processing language
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
volatile
true
friend
export
fclose()
closefile()
fileclose()
endfile()
getchar()
gets()
cin.get()