c
programming – question bank
unit -1
(2 marks)
1.
why
C is called as Function oriented language ?
2.
Give
out the syntax for scanf() and printf() with an example
3.
Give
out the structure of C program
4.
Define
constant and its types
5.
Define
character set
6.
Define
Identifiers with an example
7.
Define
variables with an example
8.
Mention
the rules for constructing character constants
9.
List
out the various logical operators
10. what is << operator and
give out an example for it
11. List out any 4 relational
operator
12. Mention any 5 Library functions
unit -1
(5 marks)
1.
write
down the rules for constructing Integer
constant with examples
2.
write
down the rules for constructing real constants in fractional form with examples
3.
write
down the rules for constructing real constants in exponential form with
examples
4.
write
a program to add two given number and
give out the sample output for it.
5.
write
a program to divide two given numbers and give out the sample output for it.
6.
write
a short note on Arithmetic operators with examples
7.
write
a short note on relational operators with examples
8.
write
a short note on Bitwise operators with examples
9.
write
a short note on Logical operators with examples
10. write a program to check a given
number is even or odd.
unit-1 (10 marks)
1.
write
a detailed note on datatypes with example
2.
Discuss
in detail about the real constants.
3.
write
a detail note on Operators.
4.
write
a detail note on a. relational operators b. bitwise operators
5.
write
a program to swap two numbers using a.
with temporary variable b.without using temporary variable
unit-2 (2 marks)
1.
Define
Conditional control structure and its types
2.
What
is repetitive control structure?
3.
what
is selective control structure ?
4.
what
is nested if ? give out an example for it
5.
what
is if-else ? give out its syntax
6.
Define
else-if Ladder? give out an example for it
7.
Give
out the syntax of for loop with an example
8.
distinguish
between do-while and while
9.
what
is the use of break statement
10. what is continue statement and why we use it ?
11. what is the use of header file
and why we include it in the program
12. list down the steps involved in
execution of c program
unit-2 (5 marks)
1.
write
a short note on if structure with an example
2.
write
a program to find the biggest of two given numbers
3.
write
a program to find the factorial of a given number
4.
discuss
briefly about else if ladder with an example program
5.
what
is while loop ? using while loop find out the sum of first 20 natural numbers
6.
what
is Switch case? give out its syntax with an example
7.
write
a short note on nested for structure
with an example
8.
write
a program to find the largest of 3 given numbers
9.
write
a short note on a. break b. continue c.goto
10. discuss briefly on ?: operator
with an example
unit-2(10 marks)
1.
Discuss
in detail about control structures
2.
write
a detail note on following with an
example a. nested if b. for c.while
3.
write
a program to generate Floyd’s triangle
4.
write
a program to check a given number is prime or not
5.
what
is nested control structure ? give out an example program for it.
unit -3 (2 marks)
1.
define
automatic variables
2.
What
is register variable? Why we use it?
3.
distinguish
local variable and global variable
4.
what is extern keyword ? Why we use it?
5.
Define
static variable? how it differs automatic variables?
6.
define
Function prototype ? give out its syntax?
7.
Define
Function definition? give out its syntax?
8.
Define
function call ? give out its syntax?
9.
List
out the ambiguity in function call ?
10. what is storage classes ? list
out the different types?
11. what is the use of strcmp()?
12. List out any 5 string functions
Unit -3 (5marks)
1.
Write
a short note on storage classes in c
2.
Write
a short note on function definition with a example
3.
Write
a short note on recursion with a example
4.
How
will you return a value from a function with example
5.
Write
a short note on register variables with example
unit-3
(10 marks)
1.
discuss
in detail about storage classes with examples
2.
write
a detailed note on functions
3.
write
a program to find the factorial of a given number using recursion
4.
write
a program to generate Fibonacci series
5.
write
a program to find the product of two given numbers
unit-4 (2 marks)
1.
what
is an array ?
2.
mention
the memory representation of an array
3.
what
is a char array ? how will you declare it ?
4.
what
is 2D array ?
5.
Mention
the memory mapping of 2D Array
6.
what
is recursion? mention its benefits
7.
what
is c preprocessor?
8.
mention
any 4 prepocessing directives?
9.
what
is the use of #include?
10. what is a Linker ?
11. what is a compiler ?
12. what is a emulator?
unit-4(5 marks)
1.
define
array ? give out an example program for array?
2.
write
a program to find the sum and average of n given numbers?
3.
write
a program to check a given string is palindrome or not ?
4.
write
a short note on strings with example
5.
write
a short note on string functions with example
6.
how
to pass an entire array to a function . explain it with a example program
7.
write
a program to print the following output:
0
1 1 2 3 5 8
8.
write
a program to calculate sum of the digits of a given number
9.
how
will you calculate the length and reverse of a string
10. what is 2D array ? give out an
example program for it
unit-4(10 marks)
1.
write
a program to search a given element in an array
2.
write
a detailed note on array and its operations
3.
write
a program to sort the given numbers in ascending order
4.
write
a detailed note on 2D array and implement it in matrix addition program
5.
write
a detailed note on string and its functions
unit-5 (2 marks)
1.
what
is a pointer ?
2.
what
is a function pointer ?
3.
Define
file
4.
mention
any 4 file functions
5.
what
is the use of fgetc () and fputc()
6.
give
out the syntax of fopen() with an example
7.
define
structure
8.
what
is union?
9.
how
will access structure ?
10. what is far pointer ?
11. what is call by value?
12. what is call by reference?
unit-5(5 marks)
1.
write
a short note on call by value with an example
2.
write
a short note on call by reference with an example ?
3.
what
is a pointer ? how will you pass pointer to an array?
4.
how
will you pass a pointer to a function with an example
5.
write
a short note on structure ? how structure members are accessed ?
6.
explain
the concept of union with an example
7.
write
a program to read the content of a file
8.
write
a short note on file modes
9.
write a program to swap two numbers using call
by reference ?
10. how will you perform file copy
unit-5
(10 marks)
1.
write
a detailed note on pointers.
2.
write
a detailed note on structures
3.
discuss
in detail about files
4.
write
a program to find even and odd numbers and to store it in two separate files
5.
write
a program to calculate student marksheet processing and store the information
in a file