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
auto
case
main
default
1
2
4
8
volatile
true
friend
export
A number
A special symbol other than underscore
Both of the above
An alphabet
double
float
char
array
int number;
float rate;
int variable_count;
int $main;
-5
0
+5
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
//
/
#
/*
What is the output of the following code?
int a = 5;printf("%d", a == 5);
5
Undefined
What will be the output of the following code?
int x = 5;printf("%d", ++x);
6
7
An Editor
A compiler
An operating system
None of these
_infomax
3infomax
infomax_ica
infomax123
no of students
7th
myName
2 bytes
4 bytes
8 bytes
1 byte
int
Constants
Keywords
Operators
Tokens
*
&
%
char > int > float
int > char > float
char < int < double
double > char > int
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
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
final
constant
const
static
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
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
4 Bytes
8 Bytes
Depends on the system/compiler
Cannot be determined
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.
-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
Martin Richards
Dennis Ritchie
Ken Thompson
Herman Hellorith
include
<
=
>=
<=
&&
| |
!
All of the above
16
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
compare two numeric values
combine two numeric values
compare two boolean values
None of the above
Algorithm
Flow-Charts
Procedural
Object Oriented
+
++
Either True or False
is less than or is more than
is equal or less or more
world
addition23
test-name
factorial
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
Logical Operator
Conditional Operator
typecast
Ternary
1return
return1
return
$return_1
10
20
None
real
The basic data type of C
Qualifier
Short is the qualifier and int is the basic data type
All of the mentioned
int my_num = 100,000;
int my_num = 100000;
int my num = 1000;
int $my_num = 10000;
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
2.5
2.000000
2.500000
30
32
36
40