Access free live classes and tests on the app
Download
+
Unacademy
  • Goals
    • AFCAT
    • AP EAMCET
    • Bank Exam
    • BPSC
    • CA Foundation
    • CAPF
    • CAT
    • CBSE Class 11
    • CBSE Class 12
    • CDS
    • CLAT
    • CSIR UGC
    • GATE
    • IIT JAM
    • JEE
    • Karnataka CET
    • Karnataka PSC
    • Kerala PSC
    • MHT CET
    • MPPSC
    • NDA
    • NEET PG
    • NEET UG
    • NTA UGC
    • Railway Exam
    • SSC
    • TS EAMCET
    • UPSC
    • WBPSC
    • CFA
Login Join for Free
avtar
  • ProfileProfile
  • Settings Settings
  • Refer your friendsRefer your friends
  • Sign outSign out
  • Terms & conditions
  • •
  • Privacy policy
  • About
  • •
  • Careers
  • •
  • Blog

© 2023 Sorting Hat Technologies Pvt Ltd

Watch Free Classes
    • GATE 2024
    • GATE 2024 Question Papers
    • GATE Notes by Jaspal Singh
    • GATE Notes by S K Mondal
    • Downloads
    • GATE 2024 Rank Predictor
    • Notifications
    • MCQs
    • Question Bank
    • Video Lectures
    • Study Materials
    • PSU Recruitment
    • Difference Between
    • Full Forms
    • Exam Tips
    • GATE Books
GATE 2026 Exam Date Announced – Complete Schedule, Syllabus, and Key Details » GATE MCQs » C Programming MCQs
Prepare for GATE & ESE

C Programming MCQs

Table of Content
  •  
GATE Rank Predictor 2024

What is an operating system?

C seems to have been originally developed as a simple programming language that helped in building operating systems that were later used in minicomputers like the DEC PDP 7, which seemed to contain minimal memory capacity when compared to mainframe machines at the time. The development of c programming began in the 1970s with the help of a language called CPL. The c language was similar and had reference to CPL, which is commonly known as a combined programming language; the CPL was a language that was developed by Ken Thompson. The development of CPL was around 1969–70. Ritchie, a colleague of Thompson, further developed the CPL language, then redesigned as well as restored common important CPU features and developed a new functioning language called C, and afterward recreated the UNIX OS with the new language.

Multiple Choice Questions (MCQs)

Q1. Which of the following is an important requirement of c programming?

  1. Function
  2. Input variables
  3. Output variables
  4. All of the above

Answer: a) function. Every c programming needs at least one function as they facilitate the whole programming process. The functions seem to act as a subprogram within the whole c programming procedure. Functions can be crucial as they contain various variables that need to be reused multiple times.

Q2. Which of the following is true in the case of c programming?

  1. The function is a variable.
  2. Parenthesis isn’t needed at all in c programming.
  3. There is no need for closing parenthesis in c programming
  4. Float is a variable.

Answer: d)Float is a variable. The float seems to be a type of variable associated with c programming and multiple other programming languages. Variables can be of different types, such as int, char, double, float, etc.

Q3. When was C programming developed?

  1. The 1950s
  2. The 1960s
  3. The 1980s
  4. The 1970s

Answer: d) the 1970s. The C programming language was developed by a scientist called Dennis M. Ritchie. He developed the c programming language around the 1970s after taking references from a computer language known as a combined programming language (CPL). 

Q4. What was C programming adapted from?

  1. C++
  2. Combined programming language
  3. python
  4. All of the above

Answer: b) combined programming language(CPL). C programming was developed with the help of a language called combined programming language, which was developed by a scientist named Ken Thompson. He was a colleague of Ritchie, who was the developer of the C programming language.

Q5. Which of the following is not a variable type in c programming?

  1. Float
  2. Int
  3. While loop
  4. All of the above

Answer. c) While loop. The float and int are commonly used variable types, and the while loop seems to be a specific type of programming language that has no properties of a variable and helps in scenarios where a program needs to run in loops.

Q6. What is the use of print f in c programming?

  1. Helps in the printing of a string on the output screen
  2. Processes the variables in a program
  3. Is a variable type
  4. All of the above

Answer. b) Helps in the printing of strings on the output screen. The print f command seems to be used by users of c programming for printing outputs of string elements on the output screen. This is one of the most used commands as it helps in recognizing all the programming is done and its output. 

Q7. What are strings in C programming?

  1. Individual variables
  2. Group of function 
  3. Group of character type variables in array form 
  4. All of the above

Answer. c) Group of character type variables in array form. Strings are a group of variables that can be of character type as well as any other variable type. The strings can contain constant values as well as variables that can change over time. Strings have the property of containing a large number of arrays.

Q8. What does a do-while loop do?

  1. Repeats the process infinitely
  2. Processes the code at least once and then repeats
  3. Repeats only once
  4. All of the above

Answer. b) Processes the code at least once and then repeats. The do-while loop, unlike the while loop, executes the code within the loop at least once at the beginning and then enters the loop once again only if the boolean condition says so.

Q9. What is a while loop?

  1. Repeats the loop if the condition applies true
  2. Processes the code at least once and then repeats
  3. Repeats only once
  4. All of the above

Answer. a) repeats the code infinitely. The while loop, unlike the do-while loop, can only execute the code only if the boolean condition is satisfied, then can run infinitely if needed.

Q10. What of the following is true?

  1. Variables are functions
  2. Variable is a type of output command
  3. Variables are used to store values
  4. All of the above

Answer. c) Variables are used to store values. Variables are a type of memory that seems to store all the input values or unknown values generated during the coding procedure. It is used as a storing unit.

Q11. What are float variables?

  1. Integer value
  2. unknown value
  3. Decimal value
  4. All of the above

Answer. c) decimal value. The variables are of different types, and one of them is a float which has the properties of storing fraction values that are in decimal form. This helps in recording nonwhole numbers without any issue.

Q12. What is a function?

  1. Looping code
  2. Code that operates when called
  3. Unknown variable
  4. All of the above

Answer. b) Code that operates when called. The function seems to be a block of code that can only run when the function name is called upon by the code. It is usually used to run large chunks of code with one command called function calling.

Q13. How many variables can the following string contain bat[45]?

  1. 20
  2. 40
  3. 44
  4. 45

Answer. d) 45. As shown in the string mentioned as bat[45], the value 45 represents the number of distinct variables that the whole string can contain and execute in one instance.

Q14. What is function overloading?

  1. Process of multiple functions
  2. Multiple functions with the same name
  3. Looping functions
  4. All of the above

Answer. b) Multiple functions with the same name. The term function overloading is used when two or more functions have the same names. C programming has a property that allows two functions with the same name to exist at one time, but their variables need to be different.

Q15. Which header file uses gets()?

  1. Studio. h
  2. Stdlib.h
  3. Conio.h
  4. All of the above

Answer. c) conio.h. The getch() command is used to show the output screen for a while and is used to read single characters on a compiler screen, later resulting in exiting the console or terminal screen. The getch() falls under the conio.h header file and can only run on old compiler softwares.

Q16. Which of the following is the wrong way of writing c language?

  1. Int bat;
  2. Float cat_a;
  3. Int @rat
  4. All of the above

Answer. c) Int @rat. The variables can only be represented in the form of normal characters with an only underscore as an exception. No other type of special characters is allowed informing data types. So, in this case, @ cannot be used to represent int data type.

Q17. What are const data types used for?

  1. Unknown values
  2. Static or constant values
  3. Dynamic variable values
  4. All of the above

Answer. b) Static or constant values. The const data types are used for storing constant values that don’t have any requirements of change in their values in the near future. The const data type serves as a lock system for these values.

Q18. What are the primary iterations in C programming?

  1. While loop
  2. Do while loop
  3. For loop
  4. All of the above

Answer. d) all of the above. Iteration seems to be a process in c programming where a specific block of code runs on a constant of the controlled loop, and the whole process involves boolean conditions. All the major loops are a part of the iteration section.

Q19. Which of the following is not related to c programming?

  1. conio.h
  2. getch()
  3. console.log
  4. All of the above

Answer. c) console.log.The console.log seems to be a command that is used mainly in a computer programming language called javascript. All other mentioned options like float and getch are a part of c programming.

Q20. What is scanf() in c programming?

  1. The layout of an input string
  2. Array
  3. Output function
  4. All of the above

Answer. a) Layout of an input string. The scanf() seems to be used with functions that help in reading formatted input data and helps in categorizing them into various data types. The scanf() can help identify what kind of data type an input seems to be.

Crack GATE with Unacademy

Get subscription and access unlimited live and recorded courses from India’s best educators

  • Structured syllabus
  • Daily live classes
  • Ask doubts
  • Tests & practice
Learn more

Notifications

Get all the important information related to the GATE Exam including the process of application, important calendar dates, eligibility criteria, exam centers etc.

Complete Guide to GATE 2025 Syllabus for CSE with Subject-wise Weightage – Quick Guide
GATE 2012 Questions with Answers
GATE 2013 Question with Answers
GATE 2014 Question with Answers
GATE 2015 Questions with Answers
GATE 2016 Questions with Answers
GATE 2017 Questions with Answers
GATE 2018 Questions with Answers
GATE 2019 Questions with Answers
GATE 2020 Question Paper with Answer: Download PDFs
GATE 2021 Questions with Answers
GATE 2022 Rankers Summit
GATE 2023 Admit Card – Release Date, How to Download & Direct Link
GATE 2023 Exam Dates
GATE 2024 Registration – Application Form at gate2024.iisc.ac.in
GATE 2026 Detailed Paper Analysis & Solution
GATE CS & IT Engineering Previous Year Questions with Answers
GATE Cutoff 2023 – Brach-wise and Category-wise cut-off
GATE Electrical Engineering Previous Year Questions with Answers
GATE Electronics and Communication Engineering (ECE) Previous Year Questions with Answers
GATE Eligibility Criteria 2026: Age Restrictions, Qualifications, and Applicants
GATE Exam Calendar 2023
GATE Exam Pattern 2023 – New Test Structure, Paper Pattern, Marking Scheme for all papers
GATE Mechanical Engineering Previous Year Questions with Answers
GATE Previous Year Question Papers with Solution – Download PDFs
GATE Previous Year Question Papers with Solutions for Civil Engineering
GATE Result 2023 Out – Steps to check GATE Result
GATE Syllabus 2026: Download GATE Syllabus PDF
See all

Related articles

Learn more topics related to GATE MCQs
Python MCQs

Python is a programming language, basically a very high-level and a general-purpose language. The design is such that it lays emphasis on code readability with the use of significant indentation. The language used in python helps construct an object-oriented approach with the aim to help the programmers write clear and logical codes for small and large-scale products.

Organisational Behaviour

The below articles contains MCQs on Organisational Behaviour. These questions involves the types of questions that are frequently asked in the examination.

Operating System MCQs

This article will discuss important points about operating systems and will as mention multiple choice questions on operating systems. The article will further explain the answers to each question in brief. Further questions related to various sections under the operating system are covered throughout the article.

Mobile Computing

MCQs on " Mobile Computing": Find the multiple choice questions on " Mobile Computing", frequently asked for all competitive examinations.

See all
Access more than

10,997+ courses for GATE & ESE

Get subscription

Trending Topics

  • Comprehensive Guide for GATE Data Science
  • GATE PYQs Test Series (DS & AI Engineering)
  • GATE DS & AI UA Lite – 2026
  • Unacademy Subscription – GATE CSIT, DSAI & Interview Preparation
  • Foundation Batch for GATE & PSUs 2028 – DSAI 4.0
  • GATE Preparation Books

Related Links

  • Abhyaas : Practice Program Batch for GATE & ESE 2026 – CE
  • Starters Kit for GATE 2027 & 2028 – CE
  • Abhyaas : Practice Batch for GATE, ESE & PSUs 2026 – ME
  • Course On Measurements & Instrumentation
  • Starters Kit for GATE 2027 & 2028 – EC
  • Distance Learning Program for GATE – ECE 2025
  • Aasha : Batch for WBSEDCL JE Gr-II 2025
  • GATE Civil Engineering Syllabus 2026
  • GATE Exam Syllabus For Mechanical Engineering
  • Best GATE Preparation Books for ECE
  • How to Prepare for GATE CS & IT
  • GATE Preparation
Download previous years papers
.
Company Logo

Unacademy is India’s largest online learning platform. Download our apps to start learning


Starting your preparation?

Call us and we will answer all your questions about learning on Unacademy

Call +91 8585858585

Company
About usShikshodayaCareers
we're hiring
BlogsPrivacy PolicyTerms and Conditions
Help & support
User GuidelinesSite MapRefund PolicyTakedown PolicyGrievance Redressal
Products
Learner appLearner appEducator appEducator appParent appParent app
Popular goals
IIT JEEUPSCSSCCSIR UGC NETNEET UG
Trending exams
GATECATCANTA UGC NETBank Exams
Study material
UPSC Study MaterialNEET UG Study MaterialCA Foundation Study MaterialJEE Study MaterialSSC Study Material

© 2026 Sorting Hat Technologies Pvt Ltd

Unacademy
  • Goals
    • AFCAT
    • AP EAMCET
    • Bank Exam
    • BPSC
    • CA Foundation
    • CAPF
    • CAT
    • CBSE Class 11
    • CBSE Class 12
    • CDS
    • CLAT
    • CSIR UGC
    • GATE
    • IIT JAM
    • JEE
    • Karnataka CET
    • Karnataka PSC
    • Kerala PSC
    • MHT CET
    • MPPSC
    • NDA
    • NEET PG
    • NEET UG
    • NTA UGC
    • Railway Exam
    • SSC
    • TS EAMCET
    • UPSC
    • WBPSC
    • CFA

Share via

COPY