solve of Question Bank on Computer Programming 1.pdf
Document Details
Uploaded by AwedNashville
Delta University Egypt
Tags
Related
- CE 101 Algorithms and Programming I PDF
- Data Structures and Algorithms with Python and C++ PDF
- CSE2305 Problem Solving using Competitive Programming PDF
- Data Structures and Algorithm Analysis in C++ 4th Edition PDF
- Introduction To Hardware PDF
- Chapter 1: Introduction to Computers and Programming PDF
Full Transcript
Questions Question A B C D What is the only function all C++ programs m...
Questions Question A B C D What is the only function all C++ programs must contain? start() system() main() program() What punctuation is used to signal the beginning and end of code blocks? {} () [] BEGIN and END Every statement in C++ should end with…….. (dot) ; (semicolon) : (colon) ‘ (single quote) …………… are used to document a program and improve its readability Arrays Functions Looping Comments Which of the following is a correct comment statement? */ comment*/ /* comment \\ comment\\ executed by the neglected by the can be written only written only in the top of Comments in C++………. compiler compiler once the program A location in the computer's memory that may contain different values at various statement memory constant variable times throughout the execution of a program is called a……………… The variable name can be start with ……… semicolon (;) underscore (_) space number Which of the following is a valid variable name? delta_univ delte univ delta-univ delta+univ Which of the following is not a correct C++ data type? float real int double Which of the following data types is assigned only an integer value 1 or 0? float char bool string Which of the following is valid variable declaration? int a; int a, int a int a: The following are all invalid variable names: 3g, 6h2, h1, 1h True False To define a variable as char, you write char ch = Z; True False To define a variable as string, you write char ch = “Delta”; True False Which of the following is a correct declaration to a constant? float PI 3.14; # define PI 3.14; # define PI = 3.14 const float PI= 3.14; The object used to print information on the screen is………………… cin cout switch if The object used to input value from keyboard is………………….. cin cout switch break Assume x=2 and y=4, what is the output after perform the following ststement? 6=6 x+y=6 x+y 6 cout