0% found this document useful (0 votes)
129 views3 pages

Question Bank

This document outlines the question bank for a programming with C course divided into 4 units. It includes short 2-3 mark questions testing differentiation of concepts and 5-10 mark questions requiring detailed explanations. The units cover C fundamentals, functions and pointers, structures, unions and preprocessor, and file handling. Example programs from lab sessions are also to be included in answers. Students are advised to refer to the textbook to prepare for the end of term exam testing all topics from the syllabus.

Uploaded by

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

Question Bank

This document outlines the question bank for a programming with C course divided into 4 units. It includes short 2-3 mark questions testing differentiation of concepts and 5-10 mark questions requiring detailed explanations. The units cover C fundamentals, functions and pointers, structures, unions and preprocessor, and file handling. Example programs from lab sessions are also to be included in answers. Students are advised to refer to the textbook to prepare for the end of term exam testing all topics from the syllabus.

Uploaded by

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

PROGRAMMING WITH C

QUESTION BANK

UNIT I
2-3 marks
 C Character set  Comments  Comma Operator
 Identifier  Expression statement  Escape sequences
 Keyword  Sizeof operator  Unary operator
 Tokens  Whitespaces (Increment and
 Constant (and its  Typedef decrement)
types)  Enumeration  Break statement
 Declaration  Ternary/Conditional  Goto statement
 Statement operator  Continue statement

Differentiation
 printf() vs scanf()
 Lvalue Vs Rvalue
 = and ==
 While Vs do while
 Identifier Vs Variable
 Entry Controlled loop Vs Exit controlled loop
 Pre Vs post increment
 Pre Vs post decrement
 Getch() Vs getche()

5-10marks
 What is C? Briefly explain its history along with its features. What are its limitations?
 What are various types of errors?
 Explain various data types in detail.
 Explain various operators in detail. What is the hierarchy/precedence of operators?
 What is Type conversion? What are its types? Explain with the help of example.
 What is decision control instructions/decision making statements/Branching statements? Explain its
types with syntax and example.
 What are loops? Explain its types with syntax and example.
 Explain switch case/Decision using switch case with syntax and code. How is it different from
multiple else if statement?
 Briefly explain all format codes (like %d, %f etc).

UNIT II
2-3 marks
 Return statement
 Recursion
 Elements of function
 NULL character
 Void/Generic pointer
 Dangling Pointer
 * and & operator

Differentiation
 Calling function Vs Called Function
 1D array Vs 2D array
 Formal Vs Actual Arguments
 Call by value Vs Call by reference
 User defined function Vs Library function
 Function declaration Vs Function Definition
 malloc() Vs calloc()
 getchar() Vs gets()
 putchar() Vs puts()

5-10 marks
 What do you mean by array? What are its types? Explain in detail along with declaration and
initialization.
 What is a function? What is the significance/importance of using it?
 What is recursion? Explain with the help of an example.
 What do you mean by Storage Classes? Explain in detail with its types.
 What is a Pointer? How do you declare and initialize it?
 Explain the concept of Chain of Pointers with example.
 Briefly explain pointer arithmetic.
 Explain the concept of pointer to array with example.
 Explain the concept of array of pointers with example.
 Explain the concept of pointer to function with example.
 How do we access 1D and 2D array using pointers.
 How do we pass array to a function?
 What is Dynamic array? What is advantage of using it? Explain with example.
 Briefly explain various Memory management functions.
 Explain different ways of inputting and outputting a string.
 Explain various string handling functions (Inbuilt/Library).
 Explain various string handling functions (User defined).
 Explain the concept of Pointer to string with example.
 Example the concept of array of string with example.
 Explain the concept of array of pointers to string with example.
 How do we pass string to a function?

UNIT III

2-3 marks
 #undef and #pragma directives
 #define
 Macro

Differentiation
 Macro Vs Function
 # Vs ## operators
 #include <file1> Vs #include “file1”
 Structure Vs Union
 Array Vs Structure
 #define Vs #include

5-10 marks
 Explain the concept of C Preprocessor (Macro expansion (with and without arguments), File
inclusion, Conditional compilation).
 What do you mean by Structures? Explain with code.
 What do you mean by Union? Explain with code.
 How do we pass structure to a function?
 Briefly explain Pointer to Structure.
 Write short note on structure within structure/ nested structure.
 Write short note on array of structures.
 Write short note on array within structure.
 Briefly Explain Bit Fields.
UNIT IV

2-3 marks questions


Header file
File Pointer
EOF
All Library functions

Differentiation
Stream oriented Vs System oriented data files
Text file Vs Binary file
fputc() vs fgetc()
fputs() vs fgets()
fprintf() vs fscanf()
argc Vs argv[]

5-10 marks
Explain the concept of files in detail. Why do we need files?
Explain different operations possible on files.
Briefly explain various file opening modes.
Explain the concept of Reading and Writing using Character I/O Functions with example.
Explain the concept of Reading and Writing using String I/O Functions.
Explain the concept of Reading and Writing using integer I/O Functions.
Explain the concept of Reading and Writing using formatted I/O Functions.
Explain the concept of Reading and Writing using Unformatted I/O Functions.
Explain the concept of File status functions.
Explain the concept of File positioning functions.
Explain standard library functions of from stdio.h, stdlib.h, conio.h, ctype.h, math.h, string.h, process.h

Note:
Along with all the questions, irrespective of marks mention syntax and example.
Include all the programs done in lab sessions (based on above concepts).

These are the possible questions covering all the topics of the syllabus. It is advised to refer text book for end
term exam.

You might also like