What is the output of the following code?
int a = 5;printf("%d", a == 5);
0
1
5
Undefined
print()
scanf()
input()
All of the above
2.5
2
2.000000
2.500000
final
constant
const
static
Value of elements in array
First element of the array
Base address of the array
Address of the last element of array
getchar()
gets()
cin.get()
* / % + - =
= * / % + -
/ * % - + =
* % / - + =
It breaks out of both loops.
It only breaks out of the innermost loop.
It causes a compile-time error.
It stops the program.
arr[2]
arr(2)
arr[3]
arr[1]
&
&&
||
!
double
float
char
array
float_int, keyword, A1
ANSI, ascii, cpu
valid, variable, name
None of the above
Call by reference
Call by value
Call by reference by passing base address to a function
Both A and C
int func();
func() int;
function int func();
declare int func();
*
%
#
break stops the loop, continue skips the rest of the iteration
Both stop the loop
break skips to the next iteration, continue exits the loop
Both skip to the next iteration
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
-1
Depends on array size
stdio.h
conio.h
stdlib.h
None of these
-3.4e38 to 3.4e38
-32767 to 32768
-32668 to 32667
-32768 to 32767
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
Return
GOTO
Switch
exit
is executed only once if the conditions is true
is also known as entry-controlled loop
is executed at least once if the conditions is false
the unconditional loop
ctype.h
math.h
3
4
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
//
/
/*
6
Decimal
Binary
Octal
Hexadecimal
_infomax
3infomax
infomax_ica
infomax123
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
long double
far double
no of students
7th
myName
int my_num = 100,000;
int my_num = 100000;
int my num = 1000;
int $my_num = 10000;
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
int a(char *s)
void b(int a[], int n)
float *c()
short d(long x)
Null
EOF
function(int ptr);
function(int *ptr);
function(*ptr);
function(ptr *int);
int
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
Spaces
Digits
Underscores
Letters
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);}
Error because of incorrect line-1 only.
Error because of incorrect line-1 and line-2.
Error because of incorrect line-2 only.
do-while
if-else
for
while
Constants
Keywords
Operators
Tokens
Using malloc() without free()
Using calloc() without realloc()
Using pointers incorrectly
LowerCase letters
UpperCase letters
CamelCase letters
return
new
volatile
What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a
int arr[5] = {1, 2, 3, 4, 5};printf("%d", arr[3]);
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.