AT & Ts Bell Laboratories of USA in 1972
AT & Ts Bell Laboratories of USA in 1970
Sun Microsystems in 1973
Cambridge University in 1972
A number
A special symbol other than underscore
Both of the above
An alphabet
Algorithm
Flow-Charts
Procedural
Object Oriented
“programming Trick”
“programming"
‘programming'
$ programming $
What will be the output of the following code?
int a = 10, b = 20;printf("%d", a + b);
30
1020
10+20
Compiler error
immutable
mutable
const
volatile
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
LowerCase letters
UpperCase letters
CamelCase letters
None of these
scanf()
getch()
getche()
gets()
char
int
float
double
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
2
4
1
Depends on the system
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
8
16
-4
-2.8
+2.8
+3
What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a
Spaces
Digits
Underscores
Letters
//
/
#
/*
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.
4 Bytes
8 Bytes
Depends on the system/compiler
Cannot be determined
&&
| |
!
All of the above
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.
results in a syntax error
output Infomax7
outputs garbage
outputs infomax and terminates abruptly
int x = 5;printf("%d", ++x);
5
6
7
array
A
B
ADA
C++
_infomax
3infomax
infomax_ica
infomax123
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
Constants
Keywords
Operators
Tokens
world
addition23
test-name
factorial
float, double
short int, double, long int
float, double, long double
double, long int, float
compare two numeric values
combine two numeric values
compare two boolean values
None of the above
link, load, code, compile and execute
code, compile, link, execute and load
code, compile, link, load and execute
compile, code, link, load and execute
The basic data type of C
Qualifier
Short is the qualifier and int is the basic data type
All of the mentioned
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.
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
include
printf("\n");
echo '\n';
printf('\n');
printf('\\n')
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
start()
printf()
main()
no of students
7th
myName
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
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
10
20
0
None
int my_num = 100,000;
int my_num = 100000;
int my num = 1000;
int $my_num = 10000;
Undefined
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
int num;
integer num;
num int;
num integer;
long double
far double