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]
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 52
Ngày làm bài: Hôm nay lúc 21:23:34 (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:  Cỡ chữ đáp án:


1-
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.
2-
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.
3-
Which of the following statement is correct about the program given below?
#include 
int main()
{
    int x = 10;
    int &y = x;
    x++;
    cout<< x << " " << y++;
    return 0; 
}
 
  A - 
The program will print the output 11 12.
  B - 
The program will print the output 12 11.
  C - 
The program will print the output 12 13.
  D - 
It will result in a compile time error.
4-
Which of the following statement is correct about the program given below?
#include 
int main()
{
    int x = 10;
    int &y = x;
    x = 25;
    y = 50;
    cout<< x << " " << --y;
    return 0; 
} 
  A - 
The program will print the output 25 49.
  B - 
It will result in a compile time error.
  C - 
The program will print the output 50 50.
  D - 
The program will print the output 49 49.
5-
Which of the following statement is correct about the program given below?
#include 
enum bix
{
    a=1, b, c
};
int main()
{
    int x = c;
    int &y = x;
    int &z = x;
    y = b;
    cout<< z--;
    return 0; 
} 
  A - 
It will result in a compile time error.
  B - 
The program will print the output 1.
  C - 
The program will print the output 2.
  D - 
The program will print the output 3.
6-
Which of the following statement is correct about the program given below?
#include 
int main()
{
    int x = 10, y = 20;
    int *ptr = &x;
    int &ref = y;
 
    *ptr++;
     ref++;    
 
    cout<< x << " " << y;
    return 0; 
} 
  A - 
The program will print the output 10 20.
  B - 
The program will print the output 10 21.
  C - 
The program will print the output 11 20.
  D - 
The program will print the output 11 21.
7-
Which of the following statement is correct about the program given below?
#include 
int main()
{
    int x = 0;
    int &y = x; y = 5; 
    while(x <= 5)
    {
        cout<< y++ << " ";
        x++;
    }
    cout<< x; 
    return 0; 
} 
  A - 
The program will print the output 5 6 7 8 9 10.
  B - 
The program will print the output 5 6 7 8 9 10 7.
  C - 
The program will print the output 5 7
  D - 
It will result in a compile time error.
8-
Which of the following statement is correct about the program given below?
#include 
int main()
{
    int m = 2, n = 6;
    int &x = m;
    int &y = n;
    m = x++; 
    x = m++;
    n = y++;
    y = n++;
    cout<< m << " " << n; 
    return 0; 
} 
  A - 
The program will print output 2 6.
  B - 
The program will print output 3 7.
  C - 
The program will print output 4 8.
  D - 
The program will print output 5 9.
9-
Which of the following statement is correct about the program given below?
#include 
int main()
{
    int m = 2, n = 6;
    int &x = m++;
    int &y = n++;
    m = x++; 
    x = m++;
    n = y++;
    y = n++;
    cout<< m << " " << n; 
    return 0; 
} 
  A - 
The program will print output 4 8.
  B - 
The program will print output 5 9.
  C - 
The program will print output 6 10.
  D - 
It will result in a compile time error.
10-
What will be the output of the following program?
#include 
class BixTest
{
    public:
    BixTest(int &x, int &y)
    {
        x++;
        y++;
    } 
};
int main()
{
    int a = 10, b = 20;
    BixTest objBT(a, b); 
    cout<< a << " " << b; 
    return 0; 
} 
  A - 
10 20
  B - 
11 21
  C - 
Garbage Garbage
  D - 
It will result in a 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

Chau Soc Thon Official Channel


Phong Bảo Official
Phong Bao 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 Linux - Bài 53
Trắc Nghiệm Thiết Kế Web (English) - Bài 36
Trắc Nghiệm ASP.NET (English) - Bài 01
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 08
Trắc Nghiệm C Sharp - Bài 10
Trắc Nghiệm Thiết Kế Web Và Flash - Bài 13
Trắc Nghiệm Ngôn Ngữ Lập Trình C - Bài 16
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 28
Trắc Nghiệm Java - Bài 21
Trắc Nghiệm Thiết Kế Web (English) - Bài 41
Trắc Nghiệm Java - Bài 18
Trắc Nghiệm C++ - Bài 08
Trắc nghiệm Linux - Bài 60
Trắc nghiệm Linux - Bài 54
Trắc Nghiệm ASP.NET (English) - Bài 27
Trắc Nghiệm Thiết Kế Web (English) - Bài 31
Trắc Nghiệm Visual Basic - Bài 06
Trắc Nghiệm ASP.NET - Bài 01
Trắc Nghiệm ASP.NET - Bài 13
Trắc Nghiệm C Sharp - Bài 19
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