Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
Martin Richards
Ken Thompson
Herman Hellorith
AT & Ts Bell Laboratories of USA in 1972
AT & Ts Bell Laboratories of USA in 1970
Sun Microsystems in 1973
Cambridge University in 1972
print()
scanf()
input()
All of the above
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
2
4
1
Depends on the system
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
Binary operator
Unary operator
Ternary operator
-1
0
Compiler
Interpreter
Assembler
None of These
Spaces
Digits
Underscores
Letters
int my_num = 100,000;
int my_num = 100000;
int my num = 1000;
int $my_num = 10000;
start()
printf()
main()
getch()
getchar()
gets()
cin.get()
signed short
unsigned short
long
int
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
immutable
mutable
const
volatile
-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
true
friend
export
What will be the output of the following code?
int x = 5;printf("%d", ++x);
5
6
7
8
16
&&
| |
!
4 Bytes
8 Bytes
Depends on the system/compiler
Cannot be determined
Logical Operator
Conditional Operator
typecast
Ternary
Either True or False
is less than or is more than
is equal or less or more
Decimal
Binary
Octal
Hexadecimal
2 bytes
4 bytes
8 bytes
1 byte
infomax
info_max
info max
All of these
no of students
char
7th
myName
1return
return1
return
$return_1
auto
case
main
default
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
link, load, code, compile and execute
code, compile, link, execute and load
code, compile, link, load and execute
compile, code, link, load and execute
3
Id_No
ID_NO
IdNo
Id No
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.
float_int, keyword, A1
ANSI, ascii, cpu
valid, variable, name
None of the above
results in a syntax error
output Infomax7
outputs garbage
outputs infomax and terminates abruptly
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
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
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
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
“programming Trick”
“programming"
‘programming'
$ programming $
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
-5
+5
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
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.
What is the output of the following code:
int x = 5;
printf("%d", x++);
Undefined
float
double