[go: up one dir, main page]

0% found this document useful (0 votes)
24 views5 pages

Quiz About Basics of C Language

This document is a quiz on the basics of the C programming language, covering topics such as variables, data types, operators, and control structures. It includes multiple-choice questions designed to test knowledge and understanding of fundamental C concepts. The quiz was last updated on May 20, 2025.

Uploaded by

chandra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views5 pages

Quiz About Basics of C Language

This document is a quiz on the basics of the C programming language, covering topics such as variables, data types, operators, and control structures. It includes multiple-choice questions designed to test knowledge and understanding of fundamental C concepts. The quiz was last updated on May 20, 2025.

Uploaded by

chandra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Tutorials

Search... Sign In
Practice
Jobs
DSA Practice Problems C C++ Java Python JavaScript Data Science Machine Learning Courses Linux DevOps SQL Web Develop

Basics of C Language
This quiz covers topics such as variables, data types, operators, control structures, and basic syntax to test your knowledge about the
fundamentals of C programming.

Last Updated : May 20, 2025 Discuss

Question 1

In the C language (GATE CS 2002)

A At most one activation record exists between the current activation record and the activation record for the main

The number of activation records between the current activation record and the activation record for the main
B
depends on the actual function calling sequence.

C The visibility of global variables depends on the actual function calling sequence.

Recursion requires the activation record for the recursive function to be saved on a different stack before the recursive
D
function can be called.

Discuss it

Question 2

The C language is:

A A context free language.

B A context sensitive language.

C A regular language.

D Parsable fully only by a Turing machine.

Discuss it

Question 3

The number of tokens in the following C statement is


printf("HELLO WORLD");

A 3

B 5

C 9

D 8
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
Got It !
acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Discuss it
Question 4

Why do statically typed languages like C generally perform better than dynamically typed languages like Python?

A Type is decided at compile time, reducing runtime overhead.

B They allocate memory at runtime dynamically.

C They use an interpreter instead of a compiler.

D They allow implicit data type conversion.

Discuss it

Question 5

Which of the following best describes C language:

A C is a low level language

B C is a high level language with features that support low level programming

C C is a high level language

D C is a very high level language

Discuss it

Question 6

#include <stdio.h>
int main()
{
int a[][3] = {1, 2, 3, 4, 5, 6};
int (*ptr)[3] = a;
printf("%d %d ", (*ptr)[1], (*ptr)[2]);
++ptr;
printf("%d %d\\n", (*ptr)[1], (*ptr)[2]);
return 0;
}

A 2356

B 2345

C 4500

D none of the above

Discuss it

We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Question 7
Which of the following was the first informal standard of C?

A K&RC

B C99

C ANSI C

D C11

Discuss it

Question 8

Output of Below C Code? Assume that int takes 4 bytes.

#include<stdio.h>
int x = 5;
int main()
{
int arr[x];
static int x = 0;
x = sizeof(arr);
printf("%d", x<<2);
return 0;
}

Thanks to Gokul Kumar for contributing this question.

A Compiler error in line "static int x = 0"

B 7

C 80

D 20

Discuss it

Question 9

#include <stdio.h>
#include <string.h>
int main()
{
char a[] = {'G','E','E','K','S','Q','U','I','Z'};
char b[] = "QUIZ";
char c[] = "GEEKS";
char d[] = "1234";
int l = strlen(a);
int o = printf("%d", sizeof((sizeof(l)+(c[5]+d[0]+a[1]+b[2]))) );
printf("%c", a[o]);
return 0;
}

Thanks to Gokul for contributing this question.

We use cookies to ensure you have the best browsing experience on our website. By using our site, you
A 4E
acknowledge that you have read and understood our Cookie Policy & Privacy Policy
B 8E

C 1234Q

D Compiler Dependent

Discuss it

Question 10

Consider line number 3 of the following C- program.

int main ( ) { /* Line 1 */


int I, N; /* Line 2 */
fro (I = 0, I < N, I++); /* Line 3 */
}

Identify the compiler's response about this line while creating the object-module

A Both lexical and syntactic errors

B Only a lexical error

C Only syntactic errors

D No compilation error

Discuss it

Tags: C Quiz

There are 25 questions to complete.

Take a part in the ongoing discussion View All Discussion

Company Explore Tutorials DSA Data Science & Web


About Us Job-A-Thon Python Data Structures ML Technologies
Corporate & Communications Legal Offline Java Algorithms Data Science With HTML
Address: Privacy Policy Classroom C++ DSA for Python CSS
Careers Program PHP Beginners
A-143, 7th Floor, Machine Learning JavaScript
Sovereign Corporate In Media DSA in GoLang Basic DSA ML Maths TypeScript
Tower, Sector- 136, Noida, Contact Us JAVA/C++ SQL Problems Data Visualisation ReactJS
Uttar Pradesh (201305) Corporate Master R Language DSA Roadmap Pandas NextJS
Solution System Android DSA Interview
Registered Address: NumPy NodeJs
Campus Design Questions
K 061, Tower K, Gulshan NLP Bootstrap
Training Master CP Competitive
Vivante Apartment, Sector Deep Learning Tailwind CSS
137, Noida, Gautam Buddh Program Videos Programming
We use cookies
Nagar, Uttarto ensure you have the best browsing experience on our website. By using our site, you
Pradesh,
201305 acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Python Computer DevOps System School Databases
Tutorial Science Git Design Subjects SQL

Python GATE CS AWS High Level Mathematics MYSQL

Examples Notes Docker Design Physics PostgreSQL

Django Operating Kubernetes Low Level Chemistry PL/SQL

Tutorial Systems Azure Design Biology MongoDB


Advertise with us Python Computer GCP UML Diagrams Social Science

Projects Network DevOps Interview Guide English Grammar

Python Database Roadmap Design Patterns


Tkinter Management OOAD
Web Scraping System System Design
OpenCV Software Bootcamp
Tutorial Engineering Interview
Python Digital Logic Questions
Interview Design

Question Engineering
Maths

Preparation More Courses Programming Clouds/Devops GATE 2026


Corner Tutorials IBM Languages DevOps GATE CS Rank
Certification C Programming Engineering Booster
Company- Software
Courses with Data AWS Solutions GATE DA Rank
Wise Development
DSA and Structures Architect Booster
Recruitment Software
Placements C++ Certification GATE CS & IT
Process Testing
Web Programming Salesforce Course - 2026
Aptitude Product
Development Course Certified GATE DA
Preparation Management
Data Science Java Administrator Course 2026
Puzzles Project
Programming Programming Course GATE Rank
Company- Management
Languages Course Predictor
Wise Linux
DevOps & Python Full
Preparation Excel
Cloud Course
All Cheat
Sheets

@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved

We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our Cookie Policy & Privacy Policy

You might also like