LakshyaEducation.in

VEDIC MATHS Video Series
  • Home
  • Video Series
    • Vedic Maths Videos
    • Quantitative Aptitude Videos
    • Class 8 Maths Videos
    • Class 9 Maths Videos
    • Class 10 Maths Videos
  • Quiz & Solutions
  • Blog
  • Store
  • Login
  • Contact Us
  • Home
  • Topic
  • C++ Programming
  • Statements

C++ Programming

STATEMENTS MCQs

Total Questions : 10

Question 1.

Which looping process is best used when the number of iterations is known?


  1.    for
  2.    while
  3.    do-while
  4.    all looping processes require that the iterations be known
 Discuss Question
Answer is Option A. -> for

None.

Question 2.

How many types of loops are there?


  1.    4
  2.    2
  3.    3
  4.    1
 Discuss Question
Answer is Option A. -> 4

There are four types of loop. They are while, do while, nested, for loop.

Question 3.


What is the output of this program?



1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int i;
6.
for (i = 0; i < 10; i++);
7.
{
8.
cout
  1.    0123456789
  2.    10
  3.    012345678910
  4.    compile time error
 Discuss Question
Answer is Option B. -> 10

for loop with a semicolon is called as body less for loop. It is used only for incrementing the 

variable values. So in this program the value is incremented and printed as 10.
Output:
$ g++ stat2.cpp
$ a.out
10

Question 4.


What is the output of this program?



1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int n = 15;
6.
for ( ; ;)
7.
cout
  1.    error
  2.    15
  3.    infinite times of printing n
  4.    none of the mentioned
 Discuss Question
Answer is Option C. -> infinite times of printing n

There is not a condition in the for loop, So it will loop continuously.

Question 5.


What is the output of this program?



1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int a = 10;
6.
if (a < 15)
7.
{
8.
time:
9.
cout
  1.    1010
  2.    10
  3.    infinitely print 10
  4.    compile time error
 Discuss Question
Answer is Option D. -> compile time error

Because the break statement need to be presented inside a loop or a switch statement.

Question 6.

The destination statement for the goto label is identified by what label?


  1.    $
  2.    @
  3.    *
  4.    :
 Discuss Question
Answer is Option D. -> :

None.

Question 7.

The switch statement is also called as?


  1.    choosing structure
  2.    selective structure
  3.    certain structure
  4.    none of the mentioned
 Discuss Question
Answer is Option B. -> selective structure

The switch statement is used to choose the certain code to execute, So it is also called as 

selective structure.

Question 8.


What is the output of this program?



1.
#include
2.
using namespace std;
3.
int main ()
4.
{
5.
int n;
6.
for (n = 5; n > 0; n--)
7.
{
8.
cout
  1.    543
  2.    54
  3.    5432
  4.    53
 Discuss Question
Answer is Option A. -> 543

Inthis program, We are printing the numbers in reverse order but by using break statement we 

stopped printing on 3.
Output:
$ g++ stat.cpp
$ a.out
543

Question 9.

The if..else statement can be replaced by which operator?


  1.    Bitwise operator
  2.    Conditional operator
  3.    Multiplicative operator
  4.    none of the mentioned
 Discuss Question
Answer is Option B. -> Conditional operator

In the conditional operator,it will predicate the output using the given condition.

Question 10.

How many sequence of statements are present in c++?


  1.    4
  2.    3
  3.    5
  4.    6
 Discuss Question
Answer is Option C. -> 5

There are five sequence of statements. They are Preprocessor directives,Comments,Declarations,

Function Declarations,Executable statements.

  • Share on Facebook!
  • Share on Pinterest!

Sub Topics

  • Abstract Classes
  • Access Control
  • Argument Passing
  • Arrays
  • Booleans
  • C++ Concepts
  • Catching Exceptions
  • Character Types
  • Class Hierarchies And Abstract Classes
  • Class Hierarchies Introduction
  • Classes
  • Comments And Indentation
  • Complex Number Type
  • Constants
  • Constructors And Destructors
  • Container Design
  • Conversion Operators
  • Declaration
  • Default Arguments
  • Dereferencing
  • Derivation And Templates
  • Derived Classes
  • Design Of Class Hierarchies
  • Enumerations
  • Error Handling
  • Error Handling Alternatives
  • Essential Operators
  • Exception Specifications
  • Exceptions
  • Exceptions And Efficiency
  • Exceptions That Are Not Errors
  • Floating Point Types
  • Free Store
  • Friends
  • Function Call
  • Function Declarations
  • Function Templates
  • Functions
  • Grouping Of Exceptions
  • Header Files Usage
  • Increment And Decrement
  • Integer Types
  • Large Objects
  • Linkage
  • Macros
  • Modularization And Interfaces
  • Multiple Inheritance
  • Namespaces
  • Objects
  • Objects And Classes
  • Oops Concepts
  • Operator Functions
  • Operators
  • Overloaded Function Names
  • Pointer To Function
  • Pointer To Void
  • Pointers
  • Pointers Into Arrays
  • Pointers To Members
  • References
  • Resource Management
  • Run Time Type Information
  • Sequence Adapters
  • Sequences
  • Simple String Template
  • Sizes
  • Specialization
  • Standard Exceptions
  • Standard Library Design
  • Statements
  • String Class
  • Structures
  • Subscripting
  • Template Arguments To Specify Policy Usage
  • Types
  • Uncaught Exceptions
  • Unspecified Number Of Arguments
  • User Defined Types
  • Value Return
  • Vector
  • Void

Topics

  • Computer Aptitude
  • SAIL Junior Officer (E-0)
  • 10th Grade
  • 11th Grade
  • 12th Grade
  • 4th Grade
  • 5th Grade
  • 6th Grade
  • 7th Grade
  • 8th Grade
  • 9th Grade
  • NCERT
  • Cat
  • Commerce
  • Computer Science
  • Engineering
  • English
  • General Knowledge
  • Ias
  • Management
  • Quantitative Aptitude
  • Reasoning Aptitude
  • General Studies (Finance And Economics)
  • Analytical Instrumentation
  • Biochemistry
  • Bioinformatics
  • Biology
  • Biotechnology
  • Bitsat
  • Business Statistics
  • C Programming
  • C++ Programming
  • Cell Biology
  • Chemistry
  • Cost Accounting
  • Drug And Pharmaceutical Biotechnology
  • Electrical Measurement And Instrumentation
  • Environment Management
  • Environmental Biotechnology
  • Enzyme Technology
  • Financial Management And Financial Markets
  • Gate
  • General Science
  • Geography
  • Heat Transfer
  • History And National Movements
  • Human Anatomy And Physiology
  • Human And Cultural Diversity
  • Human Resource Management
  • Indian Economy
  • Indian Geography
  • Indian History
  • Indian Polity
  • Instrumentation Transducers
  • International Relations
  • Life Sciences
  • Marketing And Marketing Management
  • Mass Transfer
  • Mechanics Of Materials
  • Microbiology
  • Neet
  • Professional Communication
  • Renewable Energy
  • Sociology
  • Surveying
  • Total Quality Management
  • Uidai Aadhaar Supervisor Certification
  • Virology

Recent Questions

Q.   The Most Important Consideration In Power Amplifier Is _____....

Q.   Choose The Odd One Out.

Q.   AirAsia Group Of Which Country Has Changed The Name Of Its L....

Q.   Direction Of Twist 'Z' Is

Q.   .................. Is Your Problem?

Q.   Nyquist Plot Provides Information About Absolute Stability A....

Q.   International Women's Day Is Being Celebrated On Which Date?....

Q.   A) D

Q.   Two Students Measure A Particular Length Using The Same Inst....

Q.   Light Or Heat Is Required For Which Step In The Halogenatio....

Q.   In India, The Temperate Forest Research Centre Is In Which C....

Q.   Electrophoresis Of Histones And Myoglobin Under Non-denaturi....

Q.   The Units Of Polarization Of Dielectric Are

Q.   Choose The Alternative Which Is Closely Resembles The Water-....

Q.   The Impulse Turbine Rotor Efficiency Will Have A Maximum Val....

Q.   How Much A Month Are You Paid ?

Q.   Who Has Been Awarded The Top EU Human Rights Prize- The Sakh....

Q.   Identify The Programmable Interval Timer From The Following

Q.   In Nature, Magnesium Oxide (MgO) Is

Q.   A Person Bought Two Articles A And B For Rs.5,000. He Sold A....

LakshyaEducation.in
Lakshya Education
Bhilai,Chattisgarh,India
Email: admin@lakshyaeducation.in Phone: 07893519977 (WhatsApp)

Quick Links

  • Vedic Maths
  • Quantitative Aptitude
  • Class – IX Maths
  • Class – X Maths
  • YouTube Channel
  • Maths Fast Trick
  • Blog

Our Services

  • About us
  • Privacy
  • TOS
  • Refund / Cancellation
  • Contact
  • Affiliate Program
  • Copyright © 2022 All Right Reserved | Lakshya Education     ( )
    Login / Register

    Your Account will be created automatically when you click the below Google or Facebook Login Button.
    •   Login With Facebook
    •  Login With Google
     Login With Email/Password