A
B
ADA
C++
<
=
>=
<=
LowerCase letters
UpperCase letters
CamelCase letters
None of these
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
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
exit
break
continue
return
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
2.5
2
2.000000
2.500000
Return
GOTO
Switch
do-while
if-else
for
while
The basic data type of C
Qualifier
Short is the qualifier and int is the basic data type
All of the mentioned
Moves the file pointer to a specific location
Reads a file
Writes to a file
Closes a file
AT & Ts Bell Laboratories of USA in 1972
AT & Ts Bell Laboratories of USA in 1970
Sun Microsystems in 1973
Cambridge University in 1972
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..
arr[2]
arr(2)
arr[3]
arr[1]
it Compare the variable a and the variable b are same.
The value of b is assigned to variable a but if b changes later, it will not effect the value of variable a.
The value of b is assigned to variable a but if b changes later, it will effect the value of variable a.
The value of variable a is assigned to variable b, and the value of variable b is assigned to variable a.
char
int
float
double
print()
scanf()
input()
All of the above
What is the output of the following code?
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
It breaks out of both loops.
It only breaks out of the innermost loop.
It causes a compile-time error.
It stops the program.
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
-1
1
Null
EOF
4 Bytes
8 Bytes
Depends on the system/compiler
Cannot be determined
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
int a = 10, b = 5;printf("%d", a / b);
5
0.5
15
-4
-2.8
+2.8
+3
How many times will the following loop execute?
int j;for(j = 1; j <= 10; j = j-1)printf("INFOMAX");
Forever
Never
0
10
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
volatile
true
friend
export
include
Infinitely
Variable
* / % + - =
= * / % + -
/ * % - + =
* % / - + =
ctype.h
stdio.h
conio.h
math.h
void
endl
switch
print("Hello World");
echo("Hello World");
printf("Hello World");
Martin Richards
Dennis Ritchie
Ken Thompson
Herman Hellorith
char str[] = "Hello";
char str = "Hello";
string str = "Hello";
char str[] = {'H', 'e', 'l', 'l', 'o'};
string.h
graphic.h
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
Stack
CISC
RISC
Parallel
for loop
while loop
do-while loop
None of the above
What will be the output of the following code?
int a = 10, b = 20;printf("%d", a + b);
30
1020
10+20
Compiler error
An Editor
A compiler
An operating system
exit(0)
abort()
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
infomax
info_max
info max
All of these
C compiler supports octal integer constant.
C compiler supports hexadecimal integer constant.
C compiler supports binary integer constant.
C compiler supports decimal integer constant.
4
Depends on the system
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 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.