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
  • Control Instructions

C Programming

CONTROL INSTRUCTIONS MCQs

Total Questions : 30

Page 1 of 3 pages
Question 1.

By default, the data type of a constant without a decimal point is int, whereas the one 

with a decimal point is a double.


  1.    Yes
  2.    No
 Discuss Question
Answer is Option A. -> Yes

6 is int constant. 
6.68 is double. 
6.68L is long double constant. 
6.68f is float constant. 

Question 2.

We want to test whether a value lies in the range 2 to 4 or 5 to 7. Can we do this using a switch?


  1.    Yes
  2.    No
 Discuss Question
Answer is Option A. -> Yes

We can do this in following switchstat ement

switch(a) { case 2: case 3: case 4: /* some statements */ break; case 5: case 6: case 7: /* some statements */ break; }

Question 3.

A char variable can store either an ASCII character or a Unicode character.


  1.    True
  2.    False
 Discuss Question
Answer is Option A. -> True

Yes, we can store either an ASCII character or a Unicode character in a char variable.

Question 4.

The way the break is used to take control out of switch and continue to take control 

of the beginning of the switch?


  1.    Yes
  2.    No
 Discuss Question
Answer is Option B. -> No

continue can work only with loops and not with switch

Question 5.

Can we use a switch statement to switch on strings?


  1.    Yes
  2.    No
 Discuss Question
Answer is Option B. -> No

The cases in a switch must either have integer constants or constant expressions.

Question 6.

The modulus operator cannot be used with a long double.


  1.    True
  2.    False
 Discuss Question
Answer is Option A. -> True

fmod(x,y) - Calculates x modulo y, the remainder of x/y. 
This function is the same as the modulus operator. But fmod() performs 

floating point or long doubledivisions.

Question 7.


Which of the following statements are correct about the below program?



#include<stdio.h>
int main()
{
int n = 0, y = 1;
y == 1 ? n=0 : n=1;
if(n)
printf("Yes\n");
else
printf("No\n");
return 0;
}

  1.    Error: Declaration terminated incorrectly
  2.    Error: Syntax error
  3.    Error: Lvalue required
  4.    None of above
 Discuss Question
Answer is Option C. -> Error: Lvalue required

No answer description available for this question. 

Question 8.

If scanf() is used to store a value in a char variable then along with the value a carriage return

(r) also gets stored it.


  1.    True
  2.    False
 Discuss Question
Answer is Option B. -> False

No, the carriage return tells the compiler to read the input from the buffer after 

ENTER key is pressed.

Question 9.

Which of the following sentences are correct about a switch loop in a C program?

1:switch is useful when we wish to check the value of variable against a particular set of values.

2:switch is useful when we wish to check whether a value falls in different ranges.

3:Compiler implements a jump table for cases used in switch.

4:It is not necessary to use a break in every switch statement.


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

Question 10.

A short integer is at least 16 bits wide and a long integer is at least 32 bits wide.


  1.    True
  2.    False
 Discuss Question
Answer is Option A. -> True

The basic C compiler is 16 bit compiler, below are the size of it's data types 
The size of short int is 2 bytes wide(16 bits).
The size of long int is 4 bytes wide(32 bits).

  • 1
  • 2
  • 3
  • Next →
  • Share on Facebook!
  • Share on Pinterest!

Sub Topics

  • Arrays
  • Bitwise Operators
  • C Preprocessor
  • Command Line Arguments
  • Complicated Declarations
  • Const
  • Control Instructions
  • Declarations And Initializations
  • Expressions
  • Floating Point Issues
  • Functions
  • Input / Output
  • Library Functions
  • Memory Allocation
  • Pointers
  • Strings
  • Structures
  • Subleties Of Typedef
  • Variable Number Of Arguments

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.   DIVA:OPERA

Q.   All Computers Must Have __________

Q.   Which Of The Following Statements Are Correct With Regard To....

Q.   (solve As Per The Direction Given Above)

Q.   Deficiency Of 'Thiamine' Causes

Q.   In Each Question Below A Sentence Broken Into Four Or Five P....

Q.   IRS 1A And 1B Satellites Can Carry Which Of The Following Se....

Q.   ....

Q.   For A Dc Machine Shunt Resistance And Armature Resistance Va....

Q.   ....

Q.   Who Among The Following Was The First English Man To Visit W....

Q.   Find The Correctly Spelt Word

Q.   The Color Of Fluorine Is

Q.   Rashi Went  toy Shopping With Her Mother And Saw A Toy ....

Q.   The Process Partially Responsible For The Life On Earth Is

Q.   What Is The Place Of The Indian Men's Cricket Team In The La....

Q.   ....

Q.   Match The Following: 1. Nishka (i) Later Vedic Coi....

Q.   Which Fertiliser Is Made (using Coke Oven Gas) In By Product....

Q.   ....

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