1
2
4
8
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a
What will be output if you will compile and execute the following c code?
int main(){ int a=5; float b; printf("%d",sizeof(++a+b)); printf(" %d",a); return 0;}
2 6
4 6
2 5
4 5
_infomax
3infomax
infomax_ica
infomax123
30
32
36
40
LowerCase letters
UpperCase letters
CamelCase letters
None of these
float
double
long double
far double
Either True or False
is less than or is more than
is equal or less or more
All of the above
Compiler
Interpreter
Assembler
None of These
Binary operator
Unary operator
Ternary operator
-4
-2.8
+2.8
+3
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.
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
* / % + - =
= * / % + -
/ * % - + =
* % / - + =
Constants
Keywords
Operators
Tokens
3
Logical Operator
Conditional Operator
typecast
Ternary
16
A
B
ADA
C++
compare two numeric values
combine two numeric values
compare two boolean values
None of the above
“programming Trick”
“programming"
‘programming'
$ programming $
start()
printf()
main()
getch()
What will be the output of the following code?
int a = 10, b = 20;printf("%d", a + b);
1020
10+20
Compiler error
void
endl
switch
results in a syntax error
output Infomax7
outputs garbage
outputs infomax and terminates abruptly
&&
| |
!
2 bytes
4 bytes
8 bytes
1 byte
1return
return1
return
$return_1
final
constant
const
static
&
||
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
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.
real
int
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);}
0
Error because of incorrect line-1 only.
Error because of incorrect line-1 and line-2.
Error because of incorrect line-2 only.
Algorithm
Flow-Charts
Procedural
Object Oriented
char > int > float
int > char > float
char < int < double
double > char > int
print("Hello World");
echo("Hello World");
printf("Hello World");
float, double
short int, double, long int
float, double, long double
double, long int, float
auto
case
main
default
Id_No
ID_NO
IdNo
Id No
Martin Richards
Ken Thompson
Herman Hellorith
-5
+5
volatile
true
friend
export
10
20
None
Depends on the system
The basic data type of C
Qualifier
Short is the qualifier and int is the basic data type
All of the mentioned
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 is the output of the following code?
int a = 5;printf("%d", a == 5);
5
Undefined