ctype.h
stdio.h
conio.h
math.h
What is the output of the following code?
int a = 10, b = 5;printf("%d", a / b);
5
2
0.5
15
4
8
16
1
Algorithm
Flow-Charts
Procedural
Object Oriented
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 a = 5, b = 10;if (a < b)printf("a is less than b");elseprintf("a is greater than or equal to b");
a is greater than or equal to b
a is less than b
Compiler Error
Undefined
It breaks out of both loops.
It only breaks out of the innermost loop.
It causes a compile-time error.
It stops the program.
-1
0
power of y to the x
power of x to the y
logarithm of x on the base y
Such function does not exist
stdlib.h
None of these
Decimal
Binary
Octal
Hexadecimal
no of students
char
7th
myName
//
/
#
/*
malloc()
free()
calloc()
realloc()
is executed only once if the condition is true.
is also known as entry-controlled loop.
is executed at least once if the condition is false.
is unconditional looping statement..
Null
EOF
System programming language
General purpose language
Data processing language
None of the above
int a(char *s)
void b(int a[], int n)
float *c()
short d(long x)
switch
goto
go back
return
How many times will the following loop execute?
int j;for(j = 1; j <= 10; j = j-1)printf("INFOMAX");
Forever
Never
10
Depends on the system
static
new
volatile
signed short
unsigned short
long
int
int arr[5] = {1, 2, 3, 4, 5};printf("%d", arr[3]);
3
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)
Either True or False
is less than or is more than
is equal or less or more
All of the above
scanf()
getch()
getche()
gets()
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
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
&&
| |
!
Infinitely
Variable
world
addition23
test-name
factorial
The basic data type of C
Qualifier
Short is the qualifier and int is the basic data type
All of the mentioned
arr[2]
arr(2)
arr[3]
arr[1]
Martin Richards
Dennis Ritchie
Ken Thompson
Herman Hellorith
<
=
>=
<=
link, load, code, compile and execute
code, compile, link, execute and load
code, compile, link, load and execute
compile, code, link, load and execute
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
immutable
mutable
const
for (i=1; i < 20; i++) printf ("k");
for (i=1; i = 20; i++) printf ("k");
for (i=0; i < 20; i++) printf ("k");
for (i=0; i <= 20; i++) printf ("k");
*
+
++
&
%
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.
Constants
Keywords
Operators
Tokens
break
continue
exit
Binary operator
Unary operator
Ternary operator
Read
Write
Execute
Copy
LowerCase letters
UpperCase letters
CamelCase letters
* / % + - =
= * / % + -
/ * % - + =
* % / - + =