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 54
Ngày làm bài:
Hôm nay lúc 23:57:37 (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-
Which of the following statement is correct about the program given below?
#include
int i, j; class IndiaBix { public: IndiaBix(int x = 0, int y = 0) { i = x; j = x; Display(); } void Display() { cout<< j <<" "; } }; int main() { IndiaBix objBix(10, 20); int &s = i; int &z = j; i++; cout<< s-- << " " << ++z; return 0; }
A -
The program will print the output 0 11 21.
B -
The program will print the output 10 11 11.
C -
The program will print the output 10 11 21.
D -
The program will print the output 10 11 12.
2-
Which of the following statement is correct about the program given below?
#include
int x, y; class BixTest { public: BixTest(int xx = 0, int yy = 0) { x = xx; y = yy; Display(); } void Display() { cout<< x << " " << y << " "; } }; int main() { BixTest objBT(10, 20); int &rx = x; int &ry = y; ry = x; rx = y; cout<< rx--; return 0; }
A -
The program will print the output 0 0 10.
B -
The program will print the output 10 20 10.
C -
The program will print the output 10 20 9.
D -
It will result in a compile time error.
3-
Which of the following statement is correct about the program given below?
#include
class IndiaBix { int a, b, c; public: void SetValue(int x, int y ,int z) { a = x; b = y; c = z; } void Display() { cout<< a << " " << b << " " << c; } }; int main() { IndiaBix objBix; int x = 2; int &y = x; y = 5; objBix.SetValue(x, ++y, x + y); objBix.Display(); return 0; }
A -
The program will print the output 5 6 10.
B -
The program will print the output 6 6 12.
C -
The program will print the output 6 6 10.
D -
It will result in a compile time error.
4-
What will be the output of the program given below?
#include
class BixBase { int x; public: BixBase(int xx = 0) { x = xx; } void Display() { cout<< x ; } }; class BixDerived : public BixBase { int y; public: BixDerived(int yy = 0) { y = yy; } void Display() { cout<< y ; } }; int main() { BixBase objBase(10); BixBase &objRef = objBase; BixDerived objDev(20); objRef = objDev; objDev.Display(); return 0; }
A -
10
B -
20
C -
Garbage-value
D -
It will result in a compile-time/run-time error.
5-
What will be the output of the following program?
#include
long BixFunction(int x, int y = 5, float z = 5) { return(++x * ++y + (int)++z); } int main() { cout<< BixFunction(20, 10); return 0; }
A -
237
B -
240
C -
35
D -
The program will report error on compilation.
6-
What will be the output of the following program?
#include
int BixFunction(int a, int b = 3, int c = 3) { cout<< ++a * ++b * --c ; return 0; } int main() { BixFunction(5, 0, 0); return 0; }
A -
8
B -
6
C -
-6
D -
-8
7-
What will be the output of the following program?
#include
void MyFunction(int a, int b = 40) { cout<< " a = "<< a << " b = " << b << endl; } int main() { MyFunction(20, 30); return 0; }
A -
a = 20 b = 40
B -
a = 20 b = 30
C -
a = 20 b = Garbage
D -
a = Garbage b = 40
8-
Which of the following statement is correct about the program given below?
#include
static int b = 0; void DisplayData(int *x, int *y = &b) { cout<< *x << " " << *y; } int main() { int a = 10, b = 20 ; DisplayData(&a, &b); return 0; }
A -
The program will print the output 10 20.
B -
The program will print the output 10 0.
C -
The program will print the output 10 garbage.
D -
The program will report compile time error.
9-
What will be the output of the following program?
#include
typedef void(*FunPtr)(int); int Look(int = 10, int = 20); void Note(int); int main() { FunPtr ptr = Note; (*ptr)(30); return 0; } int Look(int x, int y) { return(x + y % 20); } void Note(int x) { cout<< Look(x) << endl; }
A -
20
B -
30
C -
40
D -
Compilation fails.
10-
Which of the following statement is correct about the program given below?
#include
class IndiaBix { int x, y; public: IndiaBix(int xx = 0, int yy = 0) { x = xx; y = yy; } void Display() { cout<< x << " " << y; } IndiaBix operator +(IndiaBix z) { IndiaBix objTemp; objTemp.x = x / z.x; objTemp.y = y / z.y; return objTemp; } }; int main() { IndiaBix objBix1(90, 80); IndiaBix objBix2(10, 20); IndiaBix objSum; IndiaBix &objRef = objSum; objRef = objBix1 + objBix2; objRef.Display(); return 0; }
A -
It will result in a runtime error.
B -
It will result in a compile time error.
C -
The program will print the output 9 4.
D -
The program will print the output 100 100.
[
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 Thiết Kế Web Và Flash - Bài 28
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 48
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 04
Trắc Nghiệm Visual Basic - Bài 09
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 08
Trắc Nghiệm Thiết Kế Web (English) - Bài 44
Trắc Nghiệm Thiết Kế Web - Bài 10
Trắc Nghiệm Java - Bài 32
Trắc Nghiệm C Sharp - Bài 09
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 07
Trắc nghiệm XML - Bài 06
Trắc Nghiệm ASP.NET (English) - Bài 03
Trắc Nghiệm Java - Bài 06
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 06
Trắc Nghiệm Java - Bài 48
Trắc nghiệm PHP - Bài 01
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 26
Trắc Nghiệm Thiết Kế Web - Bài 13
Trắc Nghiệm C Sharp - Bài 23
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 39
Phát triển hệ thống: TRƯƠNG HỮU ĐỨC - Phiên bản 3.0 - © Copyright 2013 - 2024 - VNEDU.ORG