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
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.
*
&
%
#
_infomax
3infomax
infomax_ica
infomax123
char > int > float
int > char > float
char < int < double
double > char > int
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
Martin Richards
Ken Thompson
Herman Hellorith
start()
printf()
main()
getch()
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
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
//
/
/*
int number;
float rate;
int variable_count;
int $main;
1return
return1
return
$return_1
What will be the output of the following code?
int x = 5;printf("%d", ++x);
4
5
6
7
Algorithm
Flow-Charts
Procedural
Object Oriented
1
2
3
Constants
Keywords
Operators
Tokens
2 bytes
4 bytes
8 bytes
1 byte
Input data
The program does not require any function.
Output data
The program must have at least one function.
no of students
char
7th
myName
* / % + - =
= * / % + -
/ * % - + =
* % / - + =
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
int a = 10, b = 5;printf("%d", a / b);
0.5
15
float_int, keyword, A1
ANSI, ascii, cpu
valid, variable, name
None of the above
scanf()
getche()
gets()
int a = 10, b = 20;printf("%d", a + b);
30
1020
10+20
Compiler error
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
int
float
include
int a = 5;printf("%d", a == 5);
0
Undefined
volatile
true
friend
export
double
long double
far double
It returns the size of the variable in bits
It returns the size of the variable in bytes
It returns the size of the variable in kilobytes
It returns the number of elements in an array
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.
Binary operator
Unary operator
Ternary operator
All of the above
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
real
8
-4
-2.8
+2.8
+3
print("Hello World");
echo("Hello World");
printf("Hello World");
None of these
int num;
integer num;
num int;
num integer;
immutable
mutable
const
“programming Trick”
“programming"
‘programming'
$ programming $
printf("\n");
echo '\n';
printf('\n');
printf('\\n')
4 Bytes
8 Bytes
Depends on the system/compiler
Cannot be determined
2.5
2.000000
2.500000
A number
A special symbol other than underscore
Both of the above
An alphabet
signed short
unsigned short
long
array
An Editor
A compiler
An operating system
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10