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
---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]
78 bài trong 8 trang (10 bài/trang) và bạn đang ở trang 1.
Demo

What will be the output of the following program? #include #include class BixString { char x[50]; char y[50]; char z[50]; public: BixString() { } BixString(char* xx) { strcpy(x, xx); strcpy(y, xx); } BixString(char *xx, char *yy = " C++", char *zz = " Programming!") { strcpy(z, xx); strcat(z, yy); strcat(z, zz); } void Display(void) { cout<< z << endl; } }; int main() { BixString objStr("Learn", " Java"); objStr.Display(); return 0; } A. Java Programming! B. C++ Programming! C. Learn C++ Programming! D. Learn Java Programming!......

Demo

What will be the output of the following program? #include class IndiaBix { public: int x, y; IndiaBix(int xx = 10, int yy = 20) { x = xx; y = yy; } void Exchange(int *, int *); }; int main() { IndiaBix objA(30, 40); IndiaBix objB(50); objA.Exchange(&objA.x, &objB.y); cout<< objA.x << " " << objB.y << endl; return 0; } void IndiaBix::Exchange(int *x, int *y) { int t; t = *x; *x = *y; *y = t ; } A. 20 10 B. 30 20 C. 20 30 D. 30 40............

Demo

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........

Demo

Which of the following statement is correct about the program given below? #include class IndiaBix { public: void Bix(int x = 15) { x = x/2; if(x > 0) Bix(); else cout<< x % 2; } }; int main() { IndiaBix objIB; objIB.Bix(); return 0; } A. The program will display 1. B. The program will display 2. C. The program will display 15. D. The program will go into an infinite loop. E. The program will report error on compilation.........

Demo

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..........

Demo

Which of the following statement is correct about the program given below? #include enum xyz { a, b, c }; int main() { int x = a, y = b, z = c; int &p = x, &q = y, &r = z; p = ++x; q = ++y; r = ++c; cout<< p << q << r; 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 0 1 2. D. It will result in a compile time error........

Demo

Which of the following statement is correct about the program given below? #include int main() { int x = 80; int y& = x; x++; cout << x << " " << --y; return 0; } A. The program will print the output 80 80. B. The program will print the output 81 80. C. The program will print the output 81 81. D. It will result in a compile time error..........

Demo

What will be the output of the following program? #include class IndiaBix { static int count; public: static void First(void) { count = 10; } static void Second(int x) { count = count + x; } static void Display(void) { cout<< count << endl; } }; int IndiaBix::count = 0; int main() { IndiaBix :: First(); IndiaBix :: Second(5); IndiaBix :: Display(); return 0; } A. 0 B. 5 C. 10 D. 15........

Demo

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.......

Demo

Which of the following statement is correct about the program given below? #include class IndiaBix { int x; public: IndiaBix(short ss) { cout<< "Short" << endl; } IndiaBix(int xx) { cout<< "Int" << endl; } IndiaBix(char ch) { cout<< "Char" << endl; } ~IndiaBix() { cout<< "Final"; } }; int main() { IndiaBix *ptr = new IndiaBix('B'); return 0; } A. The program will print the output Short . B. The program will print the output Int . C. The program will print the output Char .......

    2    3    4    5   ...  8    Right  
Thống kê:
Phát triển hệ thống: TRƯƠNG HỮU ĐỨC - Phiên bản 3.0 - © Copyright 2013 - 2024 - VNEDU.ORG

free counters