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 56
Ngày làm bài:
Hôm nay lúc 11:16:05 (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
long FactFinder(long = 5); int main() { for(int i = 0; i<= 0; i++) cout<< FactFinder() << endl; return 0; } long FactFinder(long x) { if(x < 2) return 1; long fact = 1; for(long i = 1; i <= x-1; i++) fact = fact * i; return fact; }
A -
The program will print the output 1.
B -
The program will print the output 24.
C -
The program will print the output 120.
D -
The program will print the output garbage value.
2-
What will be the output of the following program?
#include
double BixFunction(double, double, double = 0, double = 0, double = 0); int main() { double d = 2.3; cout<< BixFunction(d, 7) << " "; cout<< BixFunction(d, 7, 6) << endl; return 0; } double BixFunction(double x, double p, double q, double r, double s) { return p +(q +(r + s * x)* x) * x; }
A -
7 20
B -
7 19.8
C -
7 Garbage
D -
7 20.8
3-
What will be the output of the following program?
#include
int main() { float Amount; float Calculate(float P = 5.0, int N = 2, float R = 2.0); Amount = Calculate(); cout<< Amount << endl; return 0; } float Calculate(float P, int N, float R) { int Year = 1; float Sum = 1 ; Sum = Sum * (1 + P * ++N * R); Year = (int)(Year + Sum); return Year; }
A -
21
B -
22
C -
31
D -
32
4-
What will be the output of the following program?
#include
class Bix { int x, y; public: void show(void); void main(void); }; void Bix::show(void) { Bix b; b.x = 2; b.y = 4; cout<< x << " " << y; } void Bix::main(void) { Bix b; b.x = 6; b.y = 8; b.show(); } int main(int argc, char *argv[]) { Bix run; run.main(); return 0; }
A -
2 4
B -
6 8
C -
The program will report error on Compilation.
D -
The program will report error on Linking.
5-
Which of the following statement is correct about the program given below?
#include
class IndiabixSample { private: int AdditionOne(int x, int y = 1) { return x * y; } public: int AdditionTwo(int x, int y = 1) { return x / y; } }; int main() { IndiabixSample objBix; cout<
A -
The program will print the output 32 0.
B -
The program will print the output 32 garbage-value.
C -
The program will print the output 32 1.
D -
The program will report compile time error.
6-
What will be the output of the following program?
#include
class IndiaBix { int K; public: void BixFunction(float, int , char); void BixFunction(float, char, char); }; int main() { IndiaBix objIB; objIB.BixFunction(15.09, 'A', char('A' + 'A')); return 0; } void IndiaBix::BixFunction(float, char y, char z) { K = int(z); K = int(y); K = y + z; cout<< "K = " << K << endl; }
A -
The program will print the output M = 130.
B -
The program will print the output M = 195.
C -
The program will print the output M = -21.
D -
The program will print the output M = -61.
7-
What will be the output of the following program?
#include
class TestDrive { int x; public: TestDrive(int xx) { x = xx; } int DriveIt(void); }; int TestDrive::DriveIt(void) { static int value = 0; int m; m = x % 2; x = x / 2; if((x / 2)) DriveIt(); value = value + m * 10; return value; } int main() { TestDrive TD(1234); cout<< TD.DriveIt() * 10 << endl; return 0; }
A -
300
B -
200
C -
Garbage value
D -
400
8-
What will be the output of the following program?
#include
class IndiaBix { int Num; public: IndiaBix(int x) { Num = x; } int BixFunction(void); }; int IndiaBix::BixFunction(void) { static int Sum = 0; int Dec; Dec = Num % 10; Num = Num / 10; if((Num / 100)) BixFunction(); Sum = Sum * 10 + Dec; return Sum; } int main() { IndiaBix objBix(12345); cout<< objBix.BixFunction(); return 0; }
A -
123
B -
321
C -
345
D -
12345
9-
What is correct about the following program?
#include
class Addition { int x; public: Addition() { x = 0; } Addition(int xx) { x = xx; } Addition operator + (int xx = 0) { Addition objTemp; objTemp.x = x + xx; return(objTemp); } void Display(void) { cout<< x << endl; } }; int main() { Addition objA(15), objB; objB = objA + 5; objB.Display(); return 0; }
A -
The program will print the output 20.
B -
The program will report run time error.
C -
The program will print the garbage value.
D -
Compilation fails due to 'operator +' cannot have default arguments.
10-
What will be the output of the following program?
#include
class AreaFinder { float l, b, h; float result; public: AreaFinder(float hh = 0, float ll = 0, float bb = 0) { l = ll; b = bb; h = hh; } void Display(int ll) { if(l = 0) result = 3.14f * h * h; else result = l * b; cout<< result; } }; int main() { AreaFinder objAF(10, 10, 20); objAF.Display(0); return 0; }
A -
0
B -
314
C -
314.0000
D -
200.0000
[
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 ( English ) - Bài 20
Trắc Nghiệm Pascal - Bài 07
Trắc Nghiệm Pascal - Bài 15
Trắc Nghiệm C Sharp - Bài 09
Trắc Nghiệm Thiết Kế Web (English) - Bài 06
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 11
Trắc Nghiệm Thiết Kế Web Và Flash - Bài 05
Trắc nghiệm Linux - Bài 52
Trắc Nghiệm Thiết Kế Web (English) - Bài 16
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 22
Trắc nghiệm Linux - Bài 66
Trắc Nghiệm C# - Bài 49
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 56
Trắc Nghiệm ASP.NET - Bài 15
Trắc nghiệm Linux ( English ) - Bài 31
Trắc nghiệm Linux ( English ) - Bài 26
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 04
Trắc Nghiệm ASP.NET (English) - Bài 28
Trắc Nghiệm Java - Bài 52
Trắc Nghiệm ASP.NET (English) - Bài 10
Phát triển hệ thống: TRƯƠNG HỮU ĐỨC - Phiên bản 3.0 - © Copyright 2013 - 2024 - VNEDU.ORG