Collection of most Frequently Asked Placement questions and Answers for Function and Pointer in C Programing in Practical viva in Engineering or Job interview for Hardware Programmer.
Variable Function Structure Pointer in C
Programming - C Viva Questions
Function in Embedded C
1. How to declare a pointer to a function?
a) Int *(fp)()
b) Int (*fp)()
c) Int * (fp)()
d) None
ANSWER: B
2. What is the difference between “extern int function_name();” and “int function_name();”
a) First is to access other function which is outside of the scope of program & second is to access the simple function.
b) First is to access the simple function & second is to access other function which is outside of the scope of program.
c) Both are same.
d) None.
ANSWER: B
3. How to declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
a) Char *(*(*a[N])))
b) Char (*(*(*a[N])))
c) Char (*(*a[N]))
d) None
ANSWER: A
4. Can we declare a function that can return a pointer to a function of the same type?
a) Yes
b) No, we cannot do it directly
ANSWER: B
5. Function vprintf() uses the functionality of which header file?
a) Stadgs.h
b) Stdarg.h
c) Stdio.h
d) None
ANSWER: B
6. What does the error, invalid redeclaration of a function mean?
a) There is no declaration in scope,
b) There are multiple declarations
c) Function is invalid
d) None
ANSWER: A
CONTINUE READING » Variable Function Structure Pointer in C
Programming - C Viva Questions
Function in Embedded C
1. How to declare a pointer to a function?
a) Int *(fp)()
b) Int (*fp)()
c) Int * (fp)()
d) None
ANSWER: B
2. What is the difference between “extern int function_name();” and “int function_name();”
a) First is to access other function which is outside of the scope of program & second is to access the simple function.
b) First is to access the simple function & second is to access other function which is outside of the scope of program.
c) Both are same.
d) None.
ANSWER: B
3. How to declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
a) Char *(*(*a[N])))
b) Char (*(*(*a[N])))
c) Char (*(*a[N]))
d) None
ANSWER: A
4. Can we declare a function that can return a pointer to a function of the same type?
a) Yes
b) No, we cannot do it directly
ANSWER: B
5. Function vprintf() uses the functionality of which header file?
a) Stadgs.h
b) Stdarg.h
c) Stdio.h
d) None
ANSWER: B
6. What does the error, invalid redeclaration of a function mean?
a) There is no declaration in scope,
b) There are multiple declarations
c) Function is invalid
d) None
ANSWER: A