To exit the function and return control to the calling function
To pause the function temporarily
To call the function again
To exit the program
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
4
5
6
Undefined
arr[4]
arr(5)
arr[5]
arr[6]
What will be the output of the following code segment?
int x = 24, y = 39, z = 45;z = x + y;y = z - y;x = z - y;printf("\n%d %d %d", x, y, z);
24 39 63
39 24 63
24 39 45
39 24 45
*
&
%
#
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
int func();
func() int;
function int func();
declare int func();
final
constant
const
static
fclose()
closefile()
fileclose()
endfile()
return
new
volatile
Compiler
Interpreter
Assembler
None of These
float
double
long double
far double
Simple Inheritance
Hybrid Inheritance
Multiple Inheritances
Hierarchical Inheritance
Find the output of following code :
int main() { int i=-2; printf (“-i=%d”,-i); return b; }
–i=2
i=-2
–i=-2
–i=+2
Value of elements in array
First element of the array
Base address of the array
Address of the last element of array
malloc()
free()
calloc()
realloc()
Either True or False
is less than or is more than
is equal or less or more
All of the above
void
endl
switch
//
/
/*
int
include
char
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
getchar()
gets()
scanf()
cin.get()
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.
Return
GOTO
Switch
exit
What will be the output of the following program?
int main() { int x=5; printf(“%d %d %d”,x,x<<2,x>>2); }
1 20 5
5 1 20
5 20 1
20 1 5
2
1
Depends on the system
float, double
short int, double, long int
float, double, long double
double, long int, float
break
continue
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
throws
throw
threw
thrown
Read
Write
Execute
Copy
ceil(1.66)
floor(1.66)
roundup(1.66)
roundto(1.66)
2 bytes
4 bytes
8 bytes
1 byte
exit(0)
abort()
All of the mentioned
Nested structure
Recursive structure
Union structure
Inline structure
start()
printf()
main()
getch()
0
-1
Depends on array size
conio.h
string.h
math.h
graphic.h
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
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..
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
Moves the file pointer to a specific location
Reads a file
Writes to a file
Closes a file
print("Hello World");
echo("Hello World");
printf("Hello World");
None of these
real
Null
EOF
Logical Operator
Conditional Operator
typecast
Ternary