"C + + Discovery Tour" Part 13th lesson: Part One Quiz

Source: Internet
Author: User

650) this.width=650; "Src=" https://mmbiz.qlogo.cn/mmbiz/ Iahl5mqlicpyn0gmfwwdrpia3itxobfebdu9lypq8e5aexqjqxzdiayrzdjsrwzqou9dun5icd1rzhc5lzjnmjtdliaq/0?wx_fmt=jpeg "alt = "0?wx_fmt=jpeg"/>

Content Introduction

1, the first part 13 lesson: The first part quiz

2, the second part of the first lesson preview: Object-oriented approach, string of the shaking insider


First Part quiz


In the last lesson, we learned the weight of the pointer.


Well, the first part of our course also ended successfully. However, how can small make you so easy to let go? (In fact, I am good Socialist Good youth well).


Therefore, it is necessary to have a simple test question, to test the effect of learning. Not hard, don't worry.


Test questions


Who is the father of 1.c++?


    1. Birj Tromman

    2. Bjarne Stroustrup

    3. Barj Grossoup


2. What is the software that combines a text editor, compiler, and debugger?


    1. IDLE

    2. Ide

    3. DEI

    4. Ied


3. What is the function of the following code?

cout << "Hello world!" << Endl;


    1. Display this text in standard output

    2. Ask the user to enter this text with the keyboard

    3. Open a new window, the title of which is this paragraph of text


4. I want to store a user's name in a variable, what is the most appropriate variable type?


    1. Int

    2. bool

    3. String

    4. Char


5. If the value of my int variable variable is 5, what is the value of variable after executing the following instruction?

variable++;


    1. 4

    2. 5

    3. 6

    4. 7


6. The following code is available:

int a (a), B (Ten), result (0);

result = a + B;

Finally, what is the value of the variable result?


    1. 0

    2. 10

    3. 20

    4. 30


7. If I define a variable like this:

int const height (15);

So, if I write a command in the program,

height++;

After running the program, how much will the height value change to?


    1. 16

    2. 15

    3. The program doesn't even compile.


8. Can the following arrays store variables of type bool?

int bestscores[10];


    1. Yes

    2. No


9. If I have a valid variable and the name is price, then how do I get its memory address?


    1. &price

    2. Price

    3. @price

    4. Price.address


10. What does the following code do primarily?

#include <iostream>

#include <fstream>

using namespace Std;


int main ()

{

Ofstream MyStream ("C:/test.txt");

return 0;

}


    1. Open a file as written, and then close the file automatically

    2. Write to File 0

    3. Copying files


Answer


    1. B

    2. B

    3. A

    4. C

    5. C

    6. D

    7. C

    8. B

    9. A

    10. A


Part Two first lesson preview


Today's class will come here, together refueling it!

Next lesson we study: Object Oriented approach, string of the insider

This article is from the "Programmer Alliance Frogoscar" blog, so be sure to keep this source http://4526621.blog.51cto.com/4516621/1751856

"C + + Discovery Tour" Part 13th lesson: Part One Quiz

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.