What will be the output of the following code?
int a = 10, b = 20;printf("%d", a + b);
30
1020
10+20
Compiler error
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
Nested structure
Recursive structure
Union structure
Inline structure
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
for (int i = 0; i < 10; i++)
for i = 0 to 10 step 1
for (i = 0; i < 10; i++)
for (i < 10; i++)
char
int
float
double
Raj says, “He wants ice cream”
Raj had said, “He wants an ice-cream”
Raj will say, “I want an ice-cream”
Raj said, “I want an ice-cream”
Constants
Keywords
Operators
Tokens
malloc()
free()
calloc()
realloc()
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
A number
A special symbol other than underscore
Both of the above
An alphabet
* / % + - =
= * / % + -
/ * % - + =
* % / - + =
array
Using malloc() without free()
Using calloc() without realloc()
Using pointers incorrectly
None of the above
4
8
16
1
Algorithm
Flow-Charts
Procedural
Object Oriented
Either True or False
is less than or is more than
is equal or less or more
All of the above
2.5
2
2.000000
2.500000
Id_No
ID_NO
IdNo
Id No
int num;
integer num;
num int;
num integer;
long double
far double
link, load, code, compile and execute
code, compile, link, execute and load
code, compile, link, load and execute
compile, code, link, load and execute
include
An array of characters
The object of some class
Same as other primitive data type
Linkedlist of characters
It breaks out of both loops.
It only breaks out of the innermost loop.
It causes a compile-time error.
It stops the program.
conio.h
string.h
math.h
graphic.h
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
Adjective
Adverbs
Noun
Verb
*
&
%
#
Compiler
Interpreter
Assembler
None of These
break
continue
return
goto
throws
throw
threw
thrown
5
6
Undefined
getchar()
gets()
scanf()
cin.get()
volatile
true
friend
export
What is the output of the following code?
main(){ int a, b; a=b=4; b=a++; printf("%d %d %d %d", a++, --b, ++a, b--);}
5 3 7 3
Syntax error
5 4 5 3
6 2 6 4
&&
| |
!
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
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
Public
Protected
Private
None of the mentioned
Return
GOTO
Switch
exit
int main(){int x,y,z;x='1'-'0'; /* line-1 */y='a'-'b'; /* line-2 */z=x+y;printf("%d",z);}
0
Error because of incorrect line-1 only.
Error because of incorrect line-1 and line-2.
Error because of incorrect line-2 only.
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
int number;
float rate;
int variable_count;
int $main;
A
B
ADA
C++
Depends on the system
Calm
Rough
Hard
Still
static
new
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");
across
over
under
from