10
20
0
None
1
-1
2
char > int > float
int > char > float
char < int < double
double > char > int
compare two numeric values
combine two numeric values
compare two boolean values
None of the above
Consider the following code and How many bytes of memory will be allocated?
int *ptr = (int *)malloc(10 * sizeof(int));
10 bytes
20 bytes
80 bytes
40 bytes
What is the output of the following code:
int x = 5;
printf("%d", x++);
4
5
6
Undefined
-4
-2.8
+2.8
+3
The basic data type of C
Qualifier
Short is the qualifier and int is the basic data type
All of the mentioned
break
exit(0)
abort()
printf("\n");
echo '\n';
printf('\n');
printf('\\n')
Logical Operator
Conditional Operator
typecast
Ternary
double
float
char
array
Either True or False
is less than or is more than
is equal or less or more
All of the above
Depends on the system
4 Bytes
8 Bytes
Depends on the system/compiler
Cannot be determined
start()
printf()
main()
getch()
How many times will the following loop execute?
int j;for(j = 1; j <= 10; j = j-1)printf("INFOMAX");
Forever
Never
Algorithm
Flow-Charts
Procedural
Object Oriented
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
C compiler supports octal integer constant.
C compiler supports hexadecimal integer constant.
C compiler supports binary integer constant.
C compiler supports decimal integer constant.
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
To exit the function and return control to the calling function
To pause the function temporarily
To call the function again
To exit the program
for (int i = 0; i < 10; i++)
for i = 0 to 10 step 1
for (i = 0; i < 10; i++)
for (i < 10; i++)
What is the output of the following code?
int arr[5] = {1, 2, 3, 4, 5};printf("%d", arr[3]);
3
volatile
true
friend
export
Spaces
Digits
Underscores
Letters
Martin Richards
Dennis Ritchie
Ken Thompson
Herman Hellorith
exit
continue
return
Compilation error
Program will terminate with an error
Undefined behavior
Array index will wrap around
ceil(1.66)
floor(1.66)
roundup(1.66)
roundto(1.66)
-5
+5
What will the following code print?
int x = 5;if (x = 0)printf("Zero");elseprintf("Not zero");
Zero
Not zero
Error
world
addition23
test-name
factorial
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
System programming language
General purpose language
Data processing language
What will be the output of the following code?
int a = 10, b = 20;printf("%d", a + b);
30
1020
10+20
Compiler error
*
+
++
&&
char str[] = "Hello";
char str = "Hello";
string str = "Hello";
char str[] = {'H', 'e', 'l', 'l', 'o'};
do-while
if-else
for
while
A number
A special symbol other than underscore
Both of the above
An alphabet
ctype.h
stdio.h
conio.h
math.h
What will be the output of following program?
int main() { for(int c=1;c<5;++c); printf(“%d”,c); }
12345
Decimal
Binary
Octal
Hexadecimal
int a = 10, b = 5;printf("%d", a / b);
0.5
15
Id_No
ID_NO
IdNo
Id No
What will be output if you compile and execute the following ‘C’ code?
void main(){int i=4,x;x=++i + ++i + ++i;printf("%d",x);}
21
18
19
It breaks out of both loops.
It only breaks out of the innermost loop.
It causes a compile-time error.
It stops the program.
for loop
while loop
do-while loop
none of the above
static
new