world
addition23
test-name
factorial
1
-1
0
2
What is the output of the following code?
int a = 5;printf("%d", a == 5);
5
Undefined
Both can occur multiple times, but a declaration must occur first.
A definition occurs once, but a declaration may occur many times.
Both can occur multiple times, but a definition must occur first.
A declaration occurs once, but a definition may occur many times.
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
* / % + - =
= * / % + -
/ * % - + =
* % / - + =
4
Depends on the system
signed short
unsigned short
long
int
getchar()
gets()
scanf()
cin.get()
char
float
double
4 Bytes
8 Bytes
Depends on the system/compiler
Cannot be determined
Id_No
ID_NO
IdNo
Id No
include
A
B
ADA
C++
They execute programs faster than compilers
They translate the entire program at once
They translate and execute code line by line
They are not used in modern programming
Decimal
Binary
Octal
Hexadecimal
What will be the output of the following code?
int a = 10, b = 20;printf("%d", a + b);
30
1020
10+20
Compiler error
-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
10
20
None
What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a
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
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
Binary operator
Unary operator
Ternary operator
All of the above
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
2.5
2.000000
2.500000
8
16
An Editor
A compiler
An operating system
None of these
results in a syntax error
output Infomax7
outputs garbage
outputs infomax and terminates abruptly
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
print("Hello World");
echo("Hello World");
printf("Hello World");
compare two numeric values
combine two numeric values
compare two boolean values
None of the above
array
C compiler supports octal integer constant.
C compiler supports hexadecimal integer constant.
C compiler supports binary integer constant.
C compiler supports decimal integer constant.
1return
return1
return
$return_1
*
+
++
&&
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
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.
int a = 10, b = 5;printf("%d", a / b);
0.5
15
//
/
#
/*
The basic data type of C
Qualifier
Short is the qualifier and int is the basic data type
All of the mentioned
&
||
!
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
2 bytes
4 bytes
8 bytes
1 byte
What is the output of the following code:
int x = 5;
printf("%d", x++);
6
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
Martin Richards
Dennis Ritchie
Ken Thompson
Herman Hellorith
_infomax
3infomax
infomax_ica
infomax123
long double
far double