C Language Questions

Q16. Which of the following function gives the current position in the file
(a) putw()
(b) ftell()
(c) fseek()
(d) getw()

Q17. Which one is a collection of one or more variables, possibly of different types, grouped together under a single name for convenient handling
(a) Pointer
(b) Matrix
(c) Array
(d) Structure

Q18. Which function converts a string of digits into its numeric equivalent
(a) atan()
(b) atoi()
(c) calloc()
(d) strcat()

Q19. Which of the following is not a storage class supported by C++
(a) register
(b) auto
(c) mutable
(d) dynamic

Q20. The following program segment in C++
const int m =10;
int &n = m;
count << m << n; will give result

(a) Compile time error
(b) run time error
(c) prints 1111
(d) print 1011

Q21. Following declaration in C++ -
int x ; int &p = x;
is same as the declaration
int x, *p; p =&x;
This remark is
(a) true
(b) false
(c) sometimes true
(d) none of these

Q22. In C++ , following statement -
Class z : public X , public Y is an example of -
(a) multiple inheritance
(b) Multilevel Inheritance
(c) linear Inheritance
(d) none of these

Q23. In C++ Overloading is otherwise called as
(a) virtual polymorphism
(b) transient polymorphism
(c) pseudo polymorphism
(d) ad –hoc polymorphism

Q24. For a method to be an interface between the outside world and a class , it has to be declared
(a) private
(b) public
(c) external
(d) protected

Q25. The maximum number of dimension an array can have in C is
(a) 3
(b) 5
(c) 6
(d) Compiler dependent

Q26. Which of the following feature of ‘C’ language is meant to provide reliable access to special memory locations
(a) static_const
(b) Pragma
(c) Volatile
(d) immutable

Q27. Which of the following are syntactically correct in C language
(a) for();
(b) for (;);
(c) for (,);
(d) for (; ;);

Q28. In C language a << 1 is equivalent to
(a) multiplying a by 2
(b) dividing a by 2
(c) adding 2 to a
(d) none of these

Q29. The following statement in‘C’ language : int **a ;
(a) is illegal
(b) is legal but meaningless
(c) syntactically and semantically is correct
(d) none of these

Q30. ______ is an example of compile time polymorphism
(a) Virtual function
(b) Member function
(c) Function overloading
(d) Friend function

1 2 3

Enter Email Address for Newsletter

Coursera: Build New Skills Anytime, Anywhere with 100% online courses. Start Now!
    Share on facebook    Share on twitter    Share on google +