ctype.h
stdio.h
conio.h
math.h
An Editor
A compiler
An operating system
None of these
Input data
The program does not require any function.
Output data
The program must have at least one function.
int
float
include
char
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
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
*
+
++
&&
switch
goto
go back
return
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 final value of x when the code is executed?
int x; for(x=0; x<10; x++) {}
10
9
0
1
What will be the output of the following code?
int x = 5;printf("%d", ++x);
4
5
6
7
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
ceil(1.66)
floor(1.66)
roundup(1.66)
roundto(1.66)
Return
GOTO
Switch
exit
It breaks out of both loops.
It only breaks out of the innermost loop.
It causes a compile-time error.
It stops the program.
scanf()
getch()
getche()
gets()
What is the output of the following code?
int x = 5;if (x > 3) { printf("Greater than 3"); } else { printf("Not greater than 3"); }
Greater than 3
Not Greater than 3
Error
No Output
volatile
true
friend
export
Moves the file pointer to a specific location
Reads a file
Writes to a file
Closes a file
int my_num = 100,000;
int my_num = 100000;
int my num = 1000;
int $my_num = 10000;
Algorithm
Flow-Charts
Procedural
Object Oriented
20
None
infomax
info_max
info max
All of these
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
&
||
!
link, load, code, compile and execute
code, compile, link, execute and load
code, compile, link, load and execute
compile, code, link, load and execute
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.
break
continue
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
2
Depends on the system
double
C compiler supports octal integer constant.
C compiler supports hexadecimal integer constant.
C compiler supports binary integer constant.
C compiler supports decimal integer constant.
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
arr[4]
arr(5)
arr[5]
arr[6]
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
function(int ptr);
function(int *ptr);
function(*ptr);
function(ptr *int);
Martin Richards
Ken Thompson
Herman Hellorith
print("Hello World");
echo("Hello World");
printf("Hello World");
print()
input()
All of the above
world
addition23
test-name
factorial
Undefined
"r"
"w"
"rw"
"read"
for (int i = 0; i < 10; i++)
for i = 0 to 10 step 1
for (i = 0; i < 10; i++)
for (i < 10; i++)
int num;
integer num;
num int;
num integer;
Id_No
ID_NO
IdNo
Id No
pair of parenthesis
semicolon
braces
colon
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
Spaces
Digits
Underscores
Letters