Студопедия

Главная страница Случайная страница

КАТЕГОРИИ:

АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторикаСоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника






C. structures have only public access specifier






16. In classes, if we declare object without keywords like public, which type will it be of?

A. private

 

17. How could you call in main the function input in object school of some class?

c. school:: input()

 

18. class student {string name, surname} Aibar; What is underlined?

A. object of class student

 

19. Which access specifier means that the member can be used only by the functions of this class?

A. private

 

20. Which is the right declaration of the object of structure student:

C. student Aibar

 

21. There is one mistake in code, in which line?

E.5

22. Which of the following correctly declares an array?

A. int anarray[10];

 

23. What is the index number of the last element of an array with 29 elements?

B. 28

 

24. Which of the following is a two-dimensional array?

B. int anarray[20][20];

 

25. Which of the following correctly accesses the seventh element stored in foo, an array with 100 elements?

A. foo[6];

 

26. Which of the following gives the memory address of the first element in array foo, an array with 100 elements?

B. foo;

 

27. When does the code block following while(x< 100) execute?

A. When x is less than one hundred

 

28. Which of the following classes handles file input?

B. ifstream

 

29. Which of the following is not a valid ofstream argument?

D. ios:: create

 

30. What does ios:: ate mean as an argument to ofstream?

.

D. Open file, set the position to the end.

31. How would you output to an open file named a_file?

D. a_file.printf(" Output");

32. What header file contains C++ file I/O instructions?

B. fstream.h

33. What value must a destructor return?


Поделиться с друзьями:

mylektsii.su - Мои Лекции - 2015-2024 год. (0.006 сек.)Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав Пожаловаться на материал