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 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
scanf()
getch()
getche()
gets()
link, load, code, compile and execute
code, compile, link, execute and load
code, compile, link, load and execute
compile, code, link, load and execute
volatile
true
friend
export
10
20
0
None
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
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
What will be the output of the following 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.
immutable
mutable
const
_infomax
3infomax
infomax_ica
infomax123
System programming language
General purpose language
Data processing language
None of the above
What is the output of the following code?
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
* / % + - =
= * / % + -
/ * % - + =
* % / - + =
Input data
The program does not require any function.
Output data
The program must have at least one function.
float, double
short int, double, long int
float, double, long double
double, long int, float
*
+
++
&&
Algorithm
Flow-Charts
Procedural
Object Oriented
results in a syntax error
output Infomax7
outputs garbage
outputs infomax and terminates abruptly
float
double
long double
far double
C compiler supports octal integer constant.
C compiler supports hexadecimal integer constant.
C compiler supports binary integer constant.
C compiler supports decimal integer constant.
LowerCase letters
UpperCase letters
CamelCase letters
None of these
char
array
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
auto
case
main
default
Spaces
Digits
Underscores
Letters
2
4
1
Depends on the system
Constants
Keywords
Operators
Tokens
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.
An Editor
A compiler
An operating system
int num;
integer num;
num int;
num integer;
Logical Operator
Conditional Operator
typecast
Ternary
1return
return1
return
$return_1
int a = 10, b = 5;printf("%d", a / b);
5
0.5
15
-1
| |
!
All of the above
<
=
>=
<=
final
constant
static
start()
printf()
main()
-4
-2.8
+2.8
+3
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
Decimal
Binary
Octal
Hexadecimal
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
8
A number
A special symbol other than underscore
Both of the above
An alphabet
int x = 5;printf("%d", ++x);
6
7
16
A
B
ADA
C++
3
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