C Programming and Data
Structures Important Questions (First 5 Units)
1. Explain and specify the interactions between
various components that support the basic functionality of a computer?
2. Discuss in detail the program execution
steps?
3
List the basic data types, their sizes and range of values supported by ‘C’
language?
4. Describe the purpose of commonly used
conversion characters in scanf() function?
5. Explain the only ternary operator available
in ‘C’ with illustrative example?
6.
Differentiate between call by value and call by reference with suitable
examples?
7.
Write a ‘C’ program using functions to check whether the given 3x3 matrix is
symmetric or not?
8.
Explain how strings are declared and initialized in ‘C’?
9. What are the arithmetic operators that are
permitted on pointers?
10.
Write a ‘C’ function to reverse the string passed as an argument that cannot be
altered?
11. Briefly explain
the type definition statement in ‘C’? Give any two examples where usage of type
definition statement increases the readability of programs?
12. Write a ‘C’
program to read, write, add, subtract, multiply and divide two complex numbers?
(Represent complex number using structures).
13.
Define Algorithm? What are the characteristics that any algorithm should
satisfy?
14
Draw a flowchart for finding maximum of given three integers?
15.
Differentiate between compiler and interpreter?
16
Differentiate between if-else-if ladder and switch statement?
17. What is the implicit type conversion
hierarchy that is applied while evaluating expressions?
18. List and give examples for different bitwise
operators available in ‘C’?
19. What is the need for user-defined functions?
20. What are the different ways in which
1-dimensional arrays can be declared and initialized?
21
Write a C program using recursion for finding GCD (Greatest Common Divisor) of
two given numbers?
22. Explain the syntax with suitable examples the
dynamic memory allocation functions available in C?
23. Write a C function to find the length of a
string passed as an argument?
24.
Differentiate between structures and unions?
25.
What do you mean by bit fields? How bit fields are different from structures?
26.
Suppose or oppose the statement “In C a structure contains a union inside it”.
Give suitable example?
27. Distinguish between getc() and getchar() functions?
28. Differentiate between application software and system
software?
29. Draw a flowchart
for finding the sum of ‘n’ numbers starting from 1?
30. Briefly discuss various computing environments with neat
diagrams?
31. What do you mean by operator precedence and
associativity? How one can override the precedence defined by C language? Give
illustrative examples?
32
Explain the structure of a C program?
33. Discuss with suitable examples the storage
classes available in C?
34
Derive the expression for finding the address of any element of a 1-dimensional
array?
35
Discuss briefly the following pointers.
I. Pointer pointing to a variable
II. Pointer pointing to a constant
III. Constant pointer pointing to a variable
IV. Constant pointer pointing to constant.
36.
Write a C program to swap two integers using functions.
37.
How many possible ways one can access the members of a structure using a structure
variable and a pointer to a structure variable? Illustrate with examples.
38
Differentiate between Arrays of structures and structures containing arrays
with suitable examples?
39. List the activities involved in each phase of
waterfall system development life cycle model?
40.
What are the different types of errors one can encounter during the program
execution?
41. What is an identifier? What are the naming
rules for identifiers in C?
42. List different categories of C operators based
on their functionality? Give examples?
43. Explain different types of coding constants in
a C?
44.
Explain different categories of functions in C with simple illustrative
examples?
45.
Write a C program using functions to calculate the factorial of a given number?
46. Demonstrate command-line arguments using a
simple program? Explain?
47. Differentiate
between a pointer and a variable? How a pointer is declared and initialized?
What do you mean by pointer to another pointer?
48. Write a C function to convert the string
passed as an argument to its uppercase equivalent?
49. What is an enumerated type? How it can be
declared? What are the different ways one can initialize enumerations?
50.
Differentiate between self referential and nested structures with suitable examples?
51. Explain different categories of an algorithm
with an example?
52.
What are the differences between signed and unsigned data types, list out them?
53. Explain the types of operators available in
C?
54.
Write a C program with Exclusive OR operation between the two integers and display
the result?
55.
What are the formatted and unformatted functions? What are the escape
sequences?
56.
Define Recursion? Write a C-Program to find the factorial of a number using
Recursion?
57. Describe the features of pointers? Explain an
array of pointer with an example?
58.
Write a C program to accept string using character pointer and display it?
59. Write
C-structures for departmental store application. Each departmental store
contains departmental store Id (3 characters), store location (string), items
(structures) and number of items. A store can offer 1 to 1000 items. Each Item
contains Item code (4 characters), current stock, unit of measure in the
following set (Single, dozen, kilogram, liter, meter, square meter) and price.
Using this structure, Write C- function to count the number of items whose
price is above the given amount.
60. What is
meant by compilation? Explain in detail?
61. What are the C keywords? Elaborate them?
62. What are unary operators and their uses? Describe
logical operators with their return values?
63. Write a C program to shift inputted data by 2 bits
left?
64. Compare different ways of passing parameters
with an example.
65
What are Storage classes? Explain different types of Storage Classes? Compare
them?
66 Discuss the different arithmetic operations with
pointers? Explain the comparison of two pointers?
67. Write a C program to display all the elements of
an array using a pointer?
68. Write
C-structures for the College data. College contains the following fields:
College code (2characters), College Name, year of
establishment, number of courses and courses. A College can offer 1 to 50
courses. Each course is associated with course name (String), duration, number
of students. The number of students in the college is sum of number of students
in all the courses in the college. Write a function
int collegeStrength(struct College
*c)
that returns the number of students in the college
pointed by c.
69. Define
Algorithm and Flow Chart?
70.
A utility company charges its customers based on their monthly utilization in
terms of units as follows:
Description charge:
First 100 units Rs.10 per unit
Next 200 units Rs. 9 per unit
Next 200 units Rs.8 per unit
Next units Rs.7 per unit
Write an Algorithm and flowchart that reads monthly
units of a customer and output the charge amount.
71
What are various conditional and bitwise operations in ‘C’, explain them with
an example?
72 Explain various looping statements in ‘C’ language
with example?
73. What are various arithmetic and assignment
operators in ‘C’, explain them with an example.
75. What is an array? What are different types of
array? Explain with examples?
76.
hat is a pointer? Define pointer-pointer concept with the help of an example?
77.
Write a program using structures to display following information for each
student name, Roll-number, mark1, mark2, mark3, total, average?
78. a) Define the flow chart? Draw a flow chart
for finding roots of a quadratic equation with all cases?
79. What are various
conditional and relational operators in ‘C’, explain them with an example.
80. Explain the control statements in ‘C’
language with an example?
81. Explain various looping
statements in ‘C’ language with example?
82. Explain briefly auto and extern storage
classes with examples?
83. Write short notes on scope of variables?
84. What is an array? What are different types of
array? Explain with examples?
85. Write a ‘C’ program using
pointer to perform string comparison?
86. What is a
structure? Give its advantage? Give an example of creating and accessing
members of a structure?