Placement papers on C - Set 1

Placement papers on C - Set 1


1. What do the 'c' and 'v' in argv stands for?

'c' means argument control 'v' means argument vector
'c' means argument count 'v' means argument vertex
'c' means argument count 'v' means argument vector
'c' means argument configuration 'v' means argument visibility
View Answer / Hide Answer

ANSWER: 'c' means argument count 'v' means argument vector




2. What do the following declaration signify?

int (*pf)();

pf is a pointer to function
pf is a function pointer.
pf is a pointer to a function which return int
pf is a function of pointer variable.
View Answer / Hide Answer

ANSWER: pf is a pointer to a function which return int




3. What do the following declaration signify?

void *cmp();

cmp is a pointer to an void type.
cmp is a void type pointer variable
cmp is a function that return a void pointer.
cmp function returns nothing.
View Answer / Hide Answer

ANSWER: cmp is a function that return a void pointer.




4. In which numbering system can the binary number 1011011111000101 be easily converted to?

Decimal system
Hexadecimal system
Octal system
No need to convert
View Answer / Hide Answer

ANSWER: Hexadecimal system




5. Which bitwise operator is suitable for turning off a particular bit in a number?

&& operator
& operator
|| operator
! operator
View Answer / Hide Answer

ANSWER: & operator




6. Which header file should be included to use functions like malloc() and calloc()?

memory.h
stdlib.h
string.h
dos.h
View Answer / Hide Answer

ANSWER: stdlib.h




7. What function should be used to free the memory allocated by calloc() ?

dealloc();
malloc(variable_name, 0)
free();
memalloc(variable_name, 0)
View Answer / Hide Answer

ANSWER: free();




8. What is the similarity between a structure, union and enumeration?

All of them let you define new values
All of them let you define new data types
All of them let you define new pointers
All of them let you define new structures
View Answer / Hide Answer

ANSWER: All of them let you define new data types




9. Does there any function exist to convert the int or float to a string?

Yes
No
View Answer / Hide Answer

ANSWER: Yes




10. What is the purpose of fflush() function.

flushes all streams and specified streams.
flushes only specified stream.
flushes input/output buffer.
flushes file buffer.
View Answer / Hide Answer

ANSWER: flushes all streams and specified streams.


Post your comment