vietjack.com

400 Câu hỏi trắc nghiệm lập trình C/C++ có đáp án (Phần 7)
Quiz

400 Câu hỏi trắc nghiệm lập trình C/C++ có đáp án (Phần 7)

A
Admin
50 câu hỏiIT TestTrắc nghiệm tổng hợp
50 CÂU HỎI
1. Nhiều lựa chọn

Class members are public by default.

A. TRUE

B. FALSE

2. Nhiều lựa chọn

Friend functions have access only to public members of the class.

A. TRUE

B. FALSE

3. Nhiều lựa chọn

A function designed as public can be accessible by non-members of a class.

A. TRUE

B. FALSE

4. Nhiều lựa chọn

Friendship is commutative.

A. TRUE

B. FALSE

5. Nhiều lựa chọn

New and delete are operators.

A. TRUE

B. FALSE

6. Nhiều lựa chọn

We can implement generic classes using templates

A. TRUE

B. FALSE

7. Nhiều lựa chọn

Using operator overloading we can invent new operators.

A. TRUE

B. FALSE

8. Nhiều lựa chọn

Inheritance helps in making a general class into a more specific class.

A. TRUE

B. FALSE

9. Nhiều lựa chọn

A base class is never used to create objects.

A. TRUE

B. FALSE

10. Nhiều lựa chọn

Classes can be inherited privately.

A. TRUE

B. FALSE

11. Nhiều lựa chọn

It Is legal to return local variables from a function which returns by reference.

A. TRUE

B. FALSE

12. Nhiều lựa chọn

Constructors can be virtual like virtual destructors

A. TRUE

B. FALSE

13. Nhiều lựa chọn

C++ is a pure object oriented programming language.

A. TRUE

B. FALSE

14. Nhiều lựa chọn

In C++ one can define a function within another function.

A. TRUE

B. FALSE

15. Nhiều lựa chọn

A class encapsulates the implementation and interface of a userdefined data type and constitutes an abstract data type.

A. TRUE

B. FALSE

16. Nhiều lựa chọn

In c++ an identifier can begin with a $ sign.

A. TRUE

B. FALSE

17. Nhiều lựa chọn

“My Variable” is a valid identifier in C++

A. TRUE

B. FALSE

18. Nhiều lựa chọn

In C++ one can get the memory addresses of variables and functions.

A. TRUE

B. FALSE

19. Nhiều lựa chọn

%= is not a operator in C++

A. TRUE

B. FALSE

20. Nhiều lựa chọn

std::cout is a standard input stream.

A. TRUE

B. FALSE

21. Nhiều lựa chọn

Preprocessor #define macro and inline functions use the same mechanism.

A. TRUE

B. FALSE

22. Nhiều lựa chọn

All C++ functions are recursive.

A. TRUE

B. FALSE

23. Nhiều lựa chọn

The ‘break’ keyword is only used in the switch..case statement.

A. TRUE

B. FALSE

24. Nhiều lựa chọn

The new operator returns the address and size of the memory block that it allocates.

A. TRUE

B. FALSE

25. Nhiều lựa chọn

The heap storage is used for local objects.

A. TRUE

B. FALSE

26. Nhiều lựa chọn

It is not necessary to initialize a reference to real object when it is declared.

A. TRUE

B. FALSE

27. Nhiều lựa chọn

There can be a null reference.

A. TRUE

B. FALSE

28. Nhiều lựa chọn

One can reassign reference after it is initialized.

A. TRUE

B. FALSE

29. Nhiều lựa chọn

It is nothing wrong that a function returning a reference to an automatic variable.

A. TRUE

B. FALSE

30. Nhiều lựa chọn

One can apply pointer arithmetic with reference variables

A. TRUE

B. FALSE

31. Nhiều lựa chọn

The preprocessor processes source code before the compiler does.

A. TRUE

B. FALSE

32. Nhiều lựa chọn

A class is a basic unit of object-oriented programming.

A. TRUE

B. FALSE

33. Nhiều lựa chọn

A function template defines a parameterized nonmember function, which enables a program to call the same function with different types of arguments.

A. TRUE

B. FALSE

34. Nhiều lựa chọn

Destructors can be overloaded.

A. TRUE

B. FALSE

35. Nhiều lựa chọn

Static data members cannot be private.

A. TRUE

B. FALSE

36. Nhiều lựa chọn

Static member functions can use this pointer.

A. TRUE

B. FALSE

37. Nhiều lựa chọn

One cannot use enumerations in a class.

A. TRUE

B. FALSE

38. Nhiều lựa chọn

One cannot create an object of a virtual class.

A. TRUE

B. FALSE

39. Nhiều lựa chọn

A class that builds a linked list should destroy the list in the class destructor.

A. TRUE

B. FALSE

40. Nhiều lựa chọn

Once an exception has been thrown, it is not possible for the program to jump back to the throw point.

A. TRUE

B. FALSE

41. Nhiều lựa chọn

In C++, only one catch block can handle all the exceptions.

A. TRUE

B. FALSE

42. Nhiều lựa chọn

There can be only one catch block in a program.

A. TRUE

B. FALSE

43. Nhiều lựa chọn

When an exception if throw, but not caught, the program ignores the error.

A. TRUE

B. FALSE

44. Nhiều lựa chọn

A class object passed to a function template must overload any operators used on the class object by the template.

A. TRUE

B. FALSE

45. Nhiều lựa chọn

In the function template definition it is not necessary to use each type parameter declared in the template prefix.

A. TRUE

B. FALSE

46. Nhiều lựa chọn

It is possible to overload a function template and an ordinary (nontemplate) function.

A. TRUE

B. FALSE

47. Nhiều lựa chọn

A class template may not be used as a base class

A. TRUE

B. FALSE

48. Nhiều lựa chọn

When declaring an iterator from the STL, the compiler automatically creates the right kind, depending upon the container it is used with.

A. TRUE

B. FALSE

49. Nhiều lựa chọn

‘ios’ stream is derived from iostream.

A. TRUE

B. FALSE

50. Nhiều lựa chọn

What is the output of the following code? Media VietJack

A. 20,21

B. 20,20

C. 21, 22

D. none of above

© All rights reserved VietJack