0% found this document useful (0 votes)
412 views

C Question Bank

This document contains a question bank with questions from 5 units of a BCA problem solving using C course. It includes very short answer, short answer and descriptive answer type questions. The questions cover topics like algorithms, C fundamentals, selection statements, loops, functions, arrays, pointers, structures, unions, file handling and preprocessors. Sample programs are also included with some questions.

Uploaded by

Sujal Bhardhwaj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
412 views

C Question Bank

This document contains a question bank with questions from 5 units of a BCA problem solving using C course. It includes very short answer, short answer and descriptive answer type questions. The questions cover topics like algorithms, C fundamentals, selection statements, loops, functions, arrays, pointers, structures, unions, file handling and preprocessors. Sample programs are also included with some questions.

Uploaded by

Sujal Bhardhwaj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

NAME OF PROGRAMME: BCA

PROBLEM SOLVING USING C


QUESTION BANK

SECTION-A (Very Short Answer Type Questions)


UNIT-I
S.No. Question
a) Define Algorithm.
b) Who developed C language and when?
c) Why is C known as a mother language?

d) What is %d in C programming?
e) What is variable? List the restrictions on the variable names.
f) What are constants? For what purpose it is used?
g) What is an assignment statement? Give the general form of an
assignment statement.
h) Explain different types of expressions in C language.
i) What are basic data types available in C? Write the significance of
each data type.
j) How can we use character set in our programs?
UNIT-II
S.No. Question
a) What is two-way selection statements?
b) Explain switch statement with syntax and example
c) What do you mean by nested loop?
d) List the differences between while loop and do-while loop.

e) How to declare and define a function?


f) Explain with syntax, the different loops used in C program
g) How a recursive function works?
h) What are the restrictions on switch values?
i) Write a C program to demonstrate the use of unconditional goto
statement.
j) Write a c-program using functions to generate the Fibonacci series.
UNIT-III
S.No. Question
a) What is array ?
b) Define string.
c) What is pointer ?
d) What do you mean by string literal?
e) Explain how the pointer variable declared and initialized?
f) Explain with example Character string.
g) Explain the representation of all types of array.
h) Explain the compile time initialization of 2D array.
i) Write a C program to read N integers into an array A and to find the
sum of odd numbers.
j) Create with example the array of varying size.
UNIT-IV
S.No. Question
a) Define Structure in C.
b) Define structure pointers.
c) What do you mean by union?
d) Which is bigger structure or union?
e) What is the size of the structure?
f) What are the storage classes of C?
g) Which is better structure or union?
h) Can a structure be a member of union?
i) C program to create, declare and initialize structure.
j) C program to demonstrate example of nested structure.
UNIT-V
S.No. Question
a) What does Stream means in C?
b) What are file handling in C?
c) Explain File Pointer in C.
d) What are different Types of Files in C?
e) Define the Conditional compilation.
f) Why we use fgetc(), fputc() in file handling?
g) What do you mean by Buffer Area or stream Pointer in C.

h) How many operations are there in file handling in C?


i) Explain fPrintf() and fscanf() library Functions.

j) What do you mean by preprocessor?

SECTION-B (Short Answer Type Questions)


UNIT-I
S.No. Question
a) Define system centric approach to solve problem.
b) What do you mean by structured programming?
c) What are the advantages of drawing a flowchart?
d) Why is C called a mid-level programming language?

e) Write a flowchart for finding biggest of three numbers.


f) Difference between algorithm and flow chart.
g) What is the difference between the local variable and global variable in
C?

h) Explain the structure of C program with example.


i) What are the formatted input and output functions. Explain with
examples.
j) Write a C program to find the largest of three numbers using ternary
operator.
UNIT-II
S.No. Question
a) List all conditional control statements used in C. Explain any two with
syntax and example.
b) What is function? Explain the difference between user defined and
library functions.
c) Write a program in C to find the sum of „n‟ natural numbers without
using any loops.
d) What are unconditional control statements? Explain any two with
syntax and example.
e) List the differences between while loop and do-while loop.
f) Explain function call, function definition and function prototype with
Examples.
g) Write a C program to find the factorial of a number using do-while,
where the number n is entered by user.
h) Write a C program to find the biggest of three numbers.
i) Write a C program that reads from the user an arithmetic operator
and two operands, perform the corresponding arithmetic operation
on the operands using switch statement.
j) Write a C program to find greatest of two numbers using ternary
operator.
UNIT-III
S.No. Question
a) Explain the declaration and initialization of one dimensional and two
dimensional array with an example.
b) How string is declared and initialized? Explain string input/output
functions with an example.
c) Explain with syntax and example, the different string manipulation
library functions with example.
d) Explain the array of pointes with example? or Explain how pointers
and arrays are related with example.
e) Explain with example arithmetic pointer.
f) How to create string functions?
g) How string is declared and initialized?
h) Write a C program to copy a string (combination of digits and
alphabet ) to another string (only alphabets).
i) Write a C program to find the transpose of a given matrix.
j) Write a C program for [consider integer data] linear search in 10
elements.
UNIT-IV
S.No. Question
a) What you meant by structure definition?
b) What is dangling pointer?
c) How to Declare a members in Structure?
d) What do you mean by structure variable and structure members?
e) Explain the difference between array and structures
f) Compare structures and unions.
g) Explain with example how to create a structure using typedef.
h) Which storage class is faster in C?
i) Write a C program to pass structure variable as function argument
j) Compare structure with an Array.
UNIT-V
S.No. Question
a) What is C File Handling Operations?
b) How to open a Text File in C?
c) How to Read and Write a Text File in C?
d) What are the 2 basic types of files?
e) What are command line arguments in C?
f) How many arguments can be passed to main ()?
g) What will the preprocessor do for a program?
h) What is the benefit of using #define to declare a constant?
i) Write a C program to create a file and write contents, save and close
the file.
j) Write a C program to replace specific line in a text file.

SECTION-C [Descriptive Answer Type Questions]


UNIT-I
S.No. Question
a) What is Token? What are the different types of token available in C
language.
b) What is type conversion? Explain two types of conversion with
examples.
c) Explain all the operators in C language in detail.
d) Write a C program which takes as input p,t,r. Compute the simple
interest and display the result.
e) Write an algorithm and flowchart for solving quadratic equation. (of
the form ax2 + bx + c).
f) Explain the process of compiling, linking and running of a program.
g) Write a C program in C to find the area and perimeter of a circle
h) Convert the following mathematical expression into C equivalent
area= s(s-a)(s-b)(s-c)
i) Write a program in C to print the numbers from 4 to 9 and their
squares
j) What is an expression? Evaluate the following expression
100 % 20 < = 20 – 5 + 100 % 10 – 20 = = 5 > = 1 != 20
a + = b * = C - = 5 where a=3 b=5 and c=8
UNIT-II
S.No. Question
a) What are the basic rules to keep in mind while declaring a function?
b) What do you mean by entry-controlled and exit-controlled loop?
c) Explain two categories/types of argument passing techniques, with
examples.
d) What is Recursion? Write a C program to compute polynomial co-
efficient nCr using recursion.
e) What is function? Explain different classification of user defined
functions based on parameter passing and return type with examples.
f) With what type of if-else statement we can compare switch statement.
g) Explain the use of break and default in switch statement with
example.
h) Implement a C program to find the reverse of an integer number and
check whether it is palindrome or not.
i) Write a program to find GCD and LCM of two numbers using concept
of functions.
j) Write a calculator program in C language to do simple operations
like addition, subtraction, multiplication and division. Use switch
statement in your program.
UNIT-III
S.No. Question
a) Define array of pointers with proper syntax and example.
b) Define Indirection and Address of operator and its different uses.
c) What do you understand by pointer to pointer? Explain its
implementation.
d) How to implement the concept of passing string to function.
e) What do you understand by function calling and explain function
prototypes.
f) Show the implementation of passing pointers to functions.
g) Write a C program to concatenate two strings without using built-in
function strcat().
h) Write a C program that reads a sentence and prints the
frequency of each of the vowels and total count of consonants?
i) Write a C program to search an element using linear and binary
techniques.
j) Write a C program that accepts (3×3 ordered matrices A and B), and
compute the following (i)summation of Two numbers (ii) Subtraction
of Two numbers
UNIT-IV
S.No. Question
a) What are the rules for declaring a structure?
b) For what purpose storage classes were used?
c) Explain array of structure and structure within a structure with an
example.
d) What is the purpose of structure and union?
e) C program to demonstrate example of structure of array.
f) What is difference between auto and static storage class?
g) C program for passing structures as function arguments and returning
a structure from a function.
h) C program to add two distances in feet and inches using structure.
i) Write a C program to maintain a record of „n‟ students details using
an array of structures with four fields (roll no, name, marks ,and
grade).Assume appropriate datatype for each field. Print the marks of
the student given the student name as input.
j) Write a program to maintain a record of „n‟ employee detail using an
array of structures with three fields(id, name , salary) and print the
details of employees whose salary is above 5000.
UNIT-V
S.No. Question
a) Write a c program to read a file.
b) Write a C program to write a file.
c) What do you understand by Command Line Arguments?
d) Can we pass arguments in main ()? Explain.
e) What is a macro, and how do you use it?
f) What is the syntax of command line argument?
g) What is the benefit of using an enum rather than a #define constant?
h) Who calls the main function in C? Can we use main () inside main ()?
i) Write a C program to rename a file using rename() function.
j) Write a C program to convert uppercase to lowercase character and
vice versa in a text file.

You might also like