WEBSITE bất vụ lợi - Vì lợi ích cộng đồng - Non-Profit Website for the benefit of Community Learning
Tìm kiếm:
TRANG NHÀ
Giới thiệu VNEDU.ORG
Điều khoản và bản quyền
Liên lạc VNEDU
TRẮC NGHIỆM TRỰC TUYẾN
Tin Học
Luyện thi Đại học
Lớp 12
Lớp 11
Lớp 10
Lớp 9
Lớp 8
Lớp 7
Lớp 6
Tiểu học
Tiếng Anh
Bài học lý thuyết
Thi bằng
Kiến thức tổng quát
Phương pháp học
---Công Cụ:---
Soạn Biểu thức
Bảng màu HTML
Ký hiệu đặc biệt 01
Ký hiệu đặc biệt 02
Ký hiệu đặc biệt 03
Ký hiệu đặc biệt 04
Ký hiệu đặc biệt 05
Ký hiệu đặc biệt 06
Ký hiệu đặc biệt 07
Ký hiệu đặc biệt [Toán]
Tin Học
||
Căn Bản
Văn Phòng
Hệ Thống - Mạng
Phần Mềm Ứng Dụng
Kỹ thuật số
Lập trình
SQL
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 50
Ngày làm bài:
Hôm nay lúc 08:03:01 (Server time)
Số câu hỏi:
10.
Tổng điểm:
10
Yêu cầu hoàn thành:
60
phút.
Thời gian còn lại:
Cỡ chữ câu hỏi:
12 pt
13 pt
14 pt
15 pt
16 pt
17 pt
18 pt
19 pt
20 pt
Cỡ chữ đáp án:
12 pt
13 pt
14 pt
15 pt
16 pt
17 pt
18 pt
19 pt
20 pt
1-
What will be the output of the following program?
#include
class Bix { public: int x; }; int main() { Bix *p = new Bix(); (*p).x = 10; cout<< (*p).x << " " << p->x << " " ; p->x = 20; cout<< (*p).x << " " << p->x ; return 0; }
A -
10 10 20 20
B -
Garbage garbage 20 20
C -
10 10 Garbage garbage
D -
Garbage garbage Garbage garbage
2-
Which of the following statement is correct about the program given below?
#include
class IndiaBix { static int x; public: static void SetData(int xx) { x = xx; } void Display() { cout<< x ; } }; int IndiaBix::x = 0; int main() { IndiaBix::SetData(33); IndiaBix::Display(); return 0; }
A -
The program will print the output 0.
B -
The program will print the output 33.
C -
The program will print the output Garbage.
D -
The program will report compile time error.
3-
Which of the following statement is correct about the program given below?
#include
class IndiaBix { static int x; public: static void SetData(int xx) { x = xx; } static void Display() { cout<< x ; } }; int IndiaBix::x = 0; int main() { IndiaBix::SetData(44); IndiaBix::Display(); return 0; }
A -
The program will print the output 0.
B -
The program will print the output 44.
C -
The program will print the output Garbage.
D -
The program will report compile time error.
4-
What will be the output of the following program?
#include
class BixTeam { int x, y; public: BixTeam(int xx) { x = ++xx; } void Display() { cout<< --x << " "; } }; int main() { BixTeam objBT(45); objBT.Display(); int *p = (int*)&objBT; *p = 23; objBT.Display(); return 0; }
A -
45 22 .
B -
46 22
C -
45 23
D -
46 23
5-
Which of the following statement is correct about the program given below?
#include
class IndiaBix { static int x; public: static void SetData(int xx) { this->x = xx; } static void Display() { cout<< x ; } }; int IndiaBix::x = 0; int main() { IndiaBix::SetData(22); IndiaBix::Display(); return 0; }
A -
The program will print the output 0.
B -
The program will print the output 22.
C -
The program will print the output Garbage.
D -
The program will report compile time error.
6-
What will be the output of the following program?
#include
class India { public: struct Bix { int x; float y; void Function(void) { y = x = (x = 4*4); y = --y * y; } void Display() { cout<< y << endl; } }B; }I; int main() { I.B.Display(); return 0; }
A -
0
B -
1
C -
-1
D -
Garbage value
7-
What will be the output of the following program?
#include
#include
class IndiaBix { int val; public: void SetValue(char *str1, char *str2) { val = strcspn(str1, str2); } void ShowValue() { cout<< val; } }; int main() { IndiaBix objBix; objBix.SetValue((char*)"India", (char*)"Bix"); objBix.ShowValue(); return 0; }
A -
2
B -
3
C -
5
D -
8
8-
Which of the following statement is correct about the program given below?
#include
#include
class IndiaBix { public: void GetData(char *s, int x, int y ) { int i = 0; for (i = x-1; y>0; i++) { cout<< s[i]; y--; } } }; int main() { IndiaBix objBix; objBix.GetData((char*)"Welcome!", 1, 3); return 0; }
A -
The program will print the output me!.
B -
The program will print the output Wel.
C -
The program will print the output !em.
D -
The program will print the output Welcome!.
9-
Which of the following statement is correct about the program given below?
#include
class BixData { int x, y, z; public: BixData(int xx, int yy, int zz) { x = ++xx; y = ++yy; z = ++zz; } void Show() { cout<< "" << x++ << " " << y++ << " " << z++; } }; int main() { BixData objData(1, 2, 3); objData.Show(); return 0; }
A -
The program will print the output 1 2 3.
B -
The program will print the output 2 3 4 .
C -
The program will print the output 4 5 6.
D -
The program will report compile time error.
10-
Which of the following statement is correct about the program given below?
#include
class IndiaBix { int x; float y; public: void Function() { x = 4; y = 2.50; delete this; } void Display() { cout<< x << " " << y; } }; int main() { IndiaBix *pBix = new IndiaBix(); pBix->Function(); pBix->Function(); pBix->Display(); return 0; }
A -
The program will print the output 4 2.5.
B -
The program will print the output 4.
C -
The program will report runtime error.
D -
The program will report compile time error.
[
Người đăng:
Thành Lãm - ST]
Ghé thăm Kênh của Vị Sư "hai lần chết đi sống lại"
Tu Si Chau Soc Thon
https://www.youtube.com/channel/UCoyC9WTTVR-M3qpTKKEXGnQ
Phong Bảo Official
Xem Nhiều nhất
Trắc Nghiệm Pascal - Bài 20
Trắc Nghiệm ASP.NET - Bài 12
Trắc Nghiệm Ngôn Ngữ Lập Trình C - Bài 16
Trắc Nghiệm ASP.NET - Bài 01
Trắc Nghiệm ASP.NET - Bài 03
Trắc nghiệm C++ - Bài 18
Trắc Nghiệm C# - Bài 53
Trắc Nghiệm ASP.NET - Bài 02
Trắc Nghiệm C# - Bài 42
Trắc Nghiệm Java - Bài 01
Trắc Nghiệm ASP.NET - Bài 04
Trắc Nghiệm Pascal - Bài 22
Trắc Nghiệm ASP.NET - Bài 13
Trắc Nghiệm ASP.NET - Bài 09
Trắc Nghiệm ASP.NET - Bài 08
Trắc nghiệm PHP - Bài 01
Trắc Nghiệm ASP.NET - Bài 06
Trắc Nghiệm ASP.NET - Bài 11
Trắc Nghiệm ASP.NET - Bài 05
Trắc Nghiệm ASP.NET - Bài 23
Đề Xuất
Trắc Nghiệm Ngôn Ngữ Lập Trình C - Bài 06
Trắc Nghiệm Thiết Kế Web - Bài 01
Trắc Nghiệm Visual Basic - Bài 30
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 24
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 01
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 19
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 50
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 11
Trắc nghiệm XML - Bài 30
Trắc Nghiệm Thiết Kế Web Và Flash - Bài 27
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 71
Trắc Nghiệm Thiết Kế Web Và Flash - Bài 19
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 56
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 04
Trắc Nghiệm C Sharp - Bài 24
Trắc Nghiệm Thiết Kế Web (English) - Bài 08
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 02
Trắc Nghiệm Visual Basic - Bài 09
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 29
Trắc Nghiệm Thiết Kế Web Và Flash - Bài 11
Phát triển hệ thống: TRƯƠNG HỮU ĐỨC - Phiên bản 3.0 - © Copyright 2013 - 2024 - VNEDU.ORG