System programming language
General purpose language
Data processing language
None of the above
fclose()
closefile()
fileclose()
endfile()
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
It breaks out of both loops.
It only breaks out of the innermost loop.
It causes a compile-time error.
It stops the program.
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
4 Bytes
8 Bytes
Depends on the system/compiler
Cannot be determined
What is the final value of x when the code is executed?
int x; for(x=0; x<10; x++) {}
10
9
0
1
An Editor
A compiler
An operating system
None of these
Infinitely
Variable
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
2.5
2
2.000000
2.500000
What is the output of the following code?
int a = 5;printf("%d", a == 5);
5
Undefined
int number;
float rate;
int variable_count;
int $main;
"r"
"w"
"rw"
"read"
What will be the output of the following code?
int x = 5;printf("%d", ++x);
4
6
7
8
16
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
ctype.h
stdio.h
conio.h
math.h
20
None
final
constant
const
static
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
int arr[5] = {1, 2, 3, 4, 5};printf("%d", arr[3]);
3
volatile
true
friend
export
start()
printf()
main()
getch()
float
real
int
double
ceil(1.66)
floor(1.66)
roundup(1.66)
roundto(1.66)
What will the following code print?
int x = 5;if (x = 0)printf("Zero");elseprintf("Not zero");
Zero
Not zero
Compilation error
Error
-1
Martin Richards
Ken Thompson
Herman Hellorith
It is used to define global variables
It is used to define a macro
It is used to include standard or user-defined header files in the program
It is used to include comments in the code
*
&
%
#
int main(){int x,y,z;x='1'-'0'; /* line-1 */y='a'-'b'; /* line-2 */z=x+y;printf("%d",z);}
Error because of incorrect line-1 only.
Error because of incorrect line-1 and line-2.
Error because of incorrect line-2 only.
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
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
compare two numeric values
combine two numeric values
compare two boolean values
Depends on the system
no of students
char
7th
myName
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
Either True or False
is less than or is more than
is equal or less or more
All of the above
for loop
while loop
do-while loop
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
Null
EOF
int a = 10, b = 5;printf("%d", a / b);
0.5
15
Constants
Keywords
Operators
Tokens
break
continue
return
exit
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
include
immutable
mutable
results in a syntax error
output Infomax7
outputs garbage
outputs infomax and terminates abruptly
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