Either True or False
is less than or is more than
is equal or less or more
All of the above
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);}
0
Error because of incorrect line-1 only.
Error because of incorrect line-1 and line-2.
Error because of incorrect line-2 only.
results in a syntax error
output Infomax7
outputs garbage
outputs infomax and terminates abruptly
Decimal
Binary
Octal
Hexadecimal
int num;
integer num;
num int;
num integer;
A number
A special symbol other than underscore
Both of the above
An alphabet
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
no of students
char
7th
myName
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
Input data
The program does not require any function.
Output data
The program must have at least one function.
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
-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
auto
case
main
default
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
2 bytes
4 bytes
8 bytes
1 byte
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
printf("\n");
echo '\n';
printf('\n');
printf('\\n')
&&
| |
!
Spaces
Digits
Underscores
Letters
Binary operator
Unary operator
Ternary operator
4
5
6
Undefined
compare two numeric values
combine two numeric values
compare two boolean values
None of the above
Compiler
Interpreter
Assembler
None of These
Algorithm
Flow-Charts
Procedural
Object Oriented
scanf()
getch()
getche()
gets()
void
endl
float
switch
10
20
None
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
print("Hello World");
echo("Hello World");
printf("Hello World");
None of these
//
/
#
/*
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
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 x = 5;printf("%d", ++x);
7
final
constant
const
static
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
start()
printf()
main()
<
=
>=
<=
“programming Trick”
“programming"
‘programming'
$ programming $
2.5
2
2.000000
2.500000
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
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
signed short
unsigned short
long
int
getchar()
cin.get()
-4
-2.8
+2.8
+3
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
C compiler supports octal integer constant.
C compiler supports hexadecimal integer constant.
C compiler supports binary integer constant.
C compiler supports decimal integer constant.
int a = 5;printf("%d", a == 5);
1
immutable
mutable
volatile
System programming language
General purpose language
Data processing language
char > int > float
int > char > float
char < int < double
double > char > int