Home Random Page


CATEGORIES:

BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism






B. The value of b is assigned to variable a but the later changes on variable b will not effect the value of variable a

c. The value of b is assigned to variable a and the later changes on variable b will effect the value of variable a

d. The value of variable a is assigned to variable b and the value of variable b is assigned to variable a.

 



Question 2

All of the following are valid expressions in C++

a = 2 + (b = 5);

a = b = c = 5;

a = 11 % 3

A. True

b. False

 



 



Question 3:

To increase the value of c by one which of the following statement is wrong?

a. c++;

b. c = c + 1;

c. c + 1 => c;

d. c += 1

 



 



Question 4:

When following piece of code is executed, what happens?

b = 3;

a = b++;

a. a contains 3 and b contains 4

b. a contains 4 and b contains 4

c. a contains 4 and b contains 3

d. a contains 3 and b contains 3

 



 



Question 5:

The result of a Relational operation is always

A. either True or False

b. is less than or is more than

c. is equal or less or more

d. All of these

 



 



Question 6:

Which of the following is not a valid relational operator?

a. ==

b. =>

c. >=

d. >=

 



Question 7:

What is the final value of x when the code int x; for(x=0; x<10; x++) {} is run?

A. 10

B. 9

C. 0

D. 1

 



 



Question 8:

When does the code block following while(x<100) execute?

A. When x is less than one hundred

B. When x is greater than one hundred

C. When x is equal to one hundred

D. While it wishes

 



 



Question 9:

Which is not a loop structure?

A. for

B. do while

C. while

D. repeat until

 

 



Question 10:

How many times is a do while loop guaranteed to loop?

A. 0

B. Infinitely

C. 1

D. Variable

Question 1

 

A variable is/are

 



a. String that varies during program execution

 



B. A portion of memory to store a determined value

 

c. Those numbers that are frequently required in programs

 



d. None of these

 



Question 2

 

Which of the following can not be used as identifiers?

 



a. Letters

 



b. Digits

 



c. Underscores

 



D. Spaces

 

Question 3

 

Which of the following identifiers is invalid?

 



a. papername

 



b. writername

 



C. typename

 

d. printname

 



Question 4

 

Which of the following can not be used as valid identifier?

 



A. bitand

 

b. bittand

 



c. biand

 



d. band

 



Question 5

 

The difference between x and ‘x’ is

 



A. The first one refers to a variable whose identifier is x and the second one refers to the character constant x

 

b. The first one is a character constant x and second one is the string literal x

 



c. Both are same

 



d. None of above

 



 



Question 6

 

Which of the following is not a valid escape code?

 



a. \t

 



b. \v

 



c. \f

 



D. \w

 

Question 7

 

Which of the following statement is true?

 



a. String Literals can extend to more than a single line of code by putting a backslash sign at the end of each unfinished line.

 



b. You can also concatenate several string constants separating them by one or several blank spaces, tabulators, newline or any other valid blank character

 



c. If we want the string literal to explicitly made of wide characters, we can precede the constant with the L prefix

 



D. All of above

 

Question 8

 

Regarding #difine which of the following statement is false?

 



a. It is not C++ statement but the directive for the preprocessor

 



b. This does not require a semicolon at the end of line

 



c. It is a C++ statement that declares a constant in C++

 



d. None of the above

 



Question 9

 

Regarding following statement which of the statements is true?

 



const int pathwidth=100;

 



a. Declares a variable pathwidth with 100 as its initial value

 



b. Declares a construction pathwidth with 100 as its initial value

 




Date: 2016-03-03; view: 1017


<== previous page | next page ==>
B. The location of variable in memory is passed to the function so that it can use the same memory area for its processing | C. Declares a constant pathwidth whose value will be 100
doclecture.net - lectures - 2014-2024 year. Copyright infringement or personal data (0.01 sec.)