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
  • Declarations And Initializations

C Programming

DECLARATIONS AND INITIALIZATIONS MCQs

Total Questions : 66

Page 1 of 7 pages
Question 1.

Is it true that a function may have several declarations, but only one definition?


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

Yes, but the function declarations must be identical.

Question 2.

Is it true that a global variable may have several declarations, but only one definition?


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

Yes, In all the global variable declarations, you need to use the keyword extern.

Question 3.

Global variable are available to all functions. Does there exist a mechanism by way of which

it available to some and not to others.


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

The only way this can be achieved is to define the variable locally in main() instead of 

defining it globally and then passing it to the functions which need it.

Question 4.

Suppose a program is divided into three files f1, f2 and f3, and a variable is defined in the file 

f1 but used in files f2 and f3. In such a case would we need the extern declaration for the 

variables in the files f2 and f3?


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

No answer description available for this question. 

Question 5.

Is there any difference in the following declarations?

int myfun(int arr[]);
int myfun(arr[20]);



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

Yes, we have to specify the data type of the parameter when declaring a function.

Question 6.

Range of float id -2.25e+308 to 2.25e+308


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

False, The range of float is -3.4e+38 to 3.4e+38.

Question 7.

Range of double is -1.7e-38 to 1.7e+38 (in 16 bit platform - Turbo C under DOS)


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

False, The range of double is -1.7e+308 to 1.7e+308.

Question 8.

If the definition of the external variable occurs in the source file before its use in a particular 

function, then there is no need for an extern declaration in the function.


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

True, When a function is declared inside the source file, that function(local function) 

get a priority than the extern function. So there is no need to declare a function as 

extern inside the same source file.

Question 9.

Size of short integer and long integer would vary from one platform to another.


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

True, Depending on the operating system/compiler/system architecture you are working on, 

the range of data types can vary.

Question 10.

Size of short integer and long integer can be verified using the sizeof() operator.

True


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

True, we can find the size of short integer and long integer using the sizeof() operator. Example:

#include<stdio.h> int main() { short int i = 10; long int j = 10; printf("short int is %d bytes., nlog int is %d bytes.", sizeof (i), sizeof(j)); return 0; } Output: short int is 2 bytes. long int is 4 bytes.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 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

Recent Posts

  • Is Ssc Difficult Than Upsc?
  • Sail E0 Exam Results Cancelled - Exam Will Be Rescheduled
  • Sail E0 Results 2022
  • Best Ssc Exam For Girls
  • Ssc Exam Guide Book
  • Quantitative Aptitude Faqs
  • Vedic Maths Faq

Recent Questions

Q.   The Value Engineering Technique In Which Experts Of The Same....

Q.   If Transcription Should Not Be Carried Out Beyond The Insert....

Q.   Buffalo Is To Leather As Llama Is To....?

Q.   Choose The Correct Answer From The Given Options To Fill The....

Q.   The Arithmetic Mean (average) Of The First 10 Whole Numbers ....

Q.   Which Governor General Is Remembered For The Annulment Of Th....

Q.   When The Voltage Across A Capacitor Is Tripled, The Stored C....

Q.   My Mother Bakes Cakes.

Q.   Log Mean Temperature Difference In Case Of Counter Flow Comp....

Q.   Which Of The Following Is Not A Matter Of Local Government?

Q.   Which Drugs Can Easily Pass The Placental Barrier?

Q.   Which Of The Following Is Not A Benefit Of BLAST?

Q.   A Part Of John's Salary Was Cut By The Government. What....

Q.   The Swollen Part Of The Pistil Is Known As ________ .

Q.   By Definition, Make A Map Is To Select Certain Features As R....

Q.   Which Of The Following Is The Best Tube Material From Therma....

Q.   If You Are Going To Use A Combination Of Three Or More AND A....

Q.   (a) A Ball Is Dropped From A Height Of 30m. After Striking T....

Q.   What Is The Approx. Value Of W, If W=(1.5)11, Given Log2 = 0....

Q.   In The Following Questions, The Symbols $, ©, *, @ And # Ar....

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)
Vedic Maths
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
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
  • 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