Input data
The program does not require any function.
Output data
The program must have at least one function.
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
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
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
start()
printf()
main()
getch()
conio.h
string.h
math.h
graphic.h
-5
1
0
+5
Algorithm
Flow-Charts
Procedural
Object Oriented
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
4
Depends on the system
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)
What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a
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
print()
scanf()
input()
All of the above
2 bytes
4 bytes
8 bytes
1 byte
"r"
"w"
"rw"
"read"
ceil(1.66)
floor(1.66)
roundup(1.66)
roundto(1.66)
ctype.h
stdio.h
break
exit(0)
abort()
All of the mentioned
pair of parenthesis
semicolon
braces
colon
* / % + - =
= * / % + -
/ * % - + =
* % / - + =
The basic data type of C
Qualifier
Short is the qualifier and int is the basic data type
System programming language
General purpose language
Data processing language
None of the above
It breaks out of both loops.
It only breaks out of the innermost loop.
It causes a compile-time error.
It stops the program.
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.
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
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
is executed only once if the conditions is true
is also known as entry-controlled loop
is executed at least once if the conditions is false
the unconditional loop
continue
return
exit
C compiler supports octal integer constant.
C compiler supports hexadecimal integer constant.
C compiler supports binary integer constant.
C compiler supports decimal integer constant.
8
16
Public
Protected
Private
None of the mentioned
across
over
under
from
malloc()
free()
calloc()
realloc()
What is the output of the following code?
int a = 10, b = 5;printf("%d", a / b);
5
0.5
15
power of y to the x
power of x to the y
logarithm of x on the base y
Such function does not exist
Spaces
Digits
Underscores
Letters
Continue
goto
static
new
volatile
Read
Write
Execute
Copy
What is the final value of x when the code is executed?
int x; for(x=0; x<10; x++) {}
10
9
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
do-while
if-else
for
while
Nominative form
Comparative form
Superlative form
Positive form
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..
stdlib.h
None of these
Using malloc() without free()
Using calloc() without realloc()
Using pointers incorrectly