• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 28 pages
Exam (elaborations)

Final Exam CSCI 121

Document preview thumbnail
Preview 3 out of 28 pages

Final Exam CSCI 121 Which of the following is a declaration statement? int x; cout x; cin x; #include iostream - CORRECT ANSWER-int x; What punctuation signifies the end of a C++ statement? - CORRECT ANSWER-semicolon Who developed C++? - CORRECT ANSWER-Bjarne Stroustrup The anagram CPU stands for - CORRECT ANSWER-Central Processing Unit If your program compiles and runs, but gives an incorrect output, this is known as a ________ error. - CORRECT ANSWER-logic or logical The compiler will catch all your programming mistakes. - CORRECT ANSWER-false Who was the programmer for Charles Babbage's analytical engine? - CORRECT ANSWER-Ada Lovelace cin number; - CORRECT ANSWER-is an input statement using namespace std; is an use directive a variable declaration an executable statement illegal code - CORRECT ANSWER-an use directive Which of the following will move the cursor to new line after print out the message? - CORRECT ANSWER-cout "Hello World!n"; Which of the following is correct? #include iostream include iostream #include (iostream) #include iostream; - CORRECT ANSWER-#include iostream Which of the following value can be assigned to x if we have the following declaration statement? - CORRECT ANSWER--1 What does the following code print to the screen? cout "hello"; - CORRECT ANSWER-hello You should write your program before you write the algorithm. - CORRECT ANSWER-false Which of the following is NOT a phase of the program-design process? problem-solving implementation Testing marketing the final program - CORRECT ANSWER-marketing the final program What is wrong with the following statement? cout "Hello to everyonen; - CORRECT ANSWER-missing a " There are 8 bytes in one bit. - CORRECT ANSWER-false The physical machines that make up a computer is called the - CORRECT ANSWER-hardware A memory address is - CORRECT ANSWER-where a variable is stored A set of instructions that the computer will follow is called a ________. - CORRECT ANSWER-program if-else statements that are inside other if-else statements are said to be - CORRECT ANSWER-nested What is the output of the following code? float value; value = 33.5; cout "value" endl; 33.5 33 value garbage - CORRECT ANSWER-value Another way to write the value is - CORRECT ANSWER-3.e09 What is the value of x after the following statements? int x;x = 15 %4; - CORRECT ANSWER-3 The integer 0 is considered true. - CORRECT ANSWER-false Each time a loop body executes is known as an ________. - CORRECT ANSWER-iteration Which of the following code segment declare a double variable x and assign value 5.0 to it correctly? This is a multiple answer question! double x = 5.0 double x, x = 5; double x; x = 5.0; double x = 5.0; - CORRECT ANSWER-double x; x = 5.0; double x = 5.0; The stream that is used for input from the keyboard is called ________. - CORRECT ANSWER-cin Given the following code fragment, what is the final value of y? int x, y; x = -1; y = 0; while(x =3) { y += 2; x +=1; } - CORRECT ANSWER-10 Variable names may begin with a number - CORRECT ANSWER-False The ________ keyword in C++11 determines the type of a variable based on the data type that the variable is set to. - CORRECT ANSWER-auto The body of a do-while loop always executes at least once - CORRECT ANSWER-true Which of the following is a valid identifier? 3_com three-com three_com 3com - CORRECT ANSWER-three_com What is the output of the following code fragment? What is the output of the following code fragment? int x = 0; while( x 5) cout x endl; x ++;


Document information

Uploaded on
September 16, 2023
Number of pages
28
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
$8.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
199
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions

Whoops! We can’t load your doc right now. Try again or contact support.