4 Bytes
8 Bytes
Depends on the system/compiler
Cannot be determined
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
2
4
1
Depends on the system
1return
return1
return
$return_1
What will be the output of the following code?
int a = 10, b = 20;printf("%d", a + b);
30
1020
10+20
Compiler error
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
5
6
Undefined
What is the output of the following code:
int x = 5;
printf("%d", x++);
-1
0
Constants
Keywords
Operators
Tokens
C compiler supports octal integer constant.
C compiler supports hexadecimal integer constant.
C compiler supports binary integer constant.
C compiler supports decimal integer constant.
What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a
float, double
short int, double, long int
float, double, long double
double, long int, float
8
16
&&
| |
!
All of the above
int x = 5;printf("%d", ++x);
7
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.
10
20
None
AT & Ts Bell Laboratories of USA in 1972
AT & Ts Bell Laboratories of USA in 1970
Sun Microsystems in 1973
Cambridge University in 1972
char
int
float
double
Keywords can be used as variable names
Variable names can contain digits
Variable names do not contain blank spaces
Capital letters can be used in variable names.
To determine which operator evaluated first from left to right.
To determine the level of an operator in a program.
To determine how an expression involving more than one operator is evaluated.
To check the expression is valid or not.
getchar()
gets()
scanf()
cin.get()
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
LowerCase letters
UpperCase letters
CamelCase letters
None of these
-5
+5
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
//
/
#
/*
2 bytes
4 bytes
8 bytes
1 byte
What is the output of the following code?
int a = 5;printf("%d", a == 5);
_infomax
3infomax
infomax_ica
infomax123
3
compare two numeric values
combine two numeric values
compare two boolean values
None of the above
<
=
>=
<=
immutable
mutable
const
volatile
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
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
*
&
%
char > int > float
int > char > float
char < int < double
double > char > int
infomax
info_max
info max
All of these
true
friend
export
+
++
auto
case
main
default
Algorithm
Flow-Charts
Procedural
Object Oriented
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
System programming language
General purpose language
Data processing language
print()
input()
getch()
getche()
no of students
7th
myName