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

CCP - Question Bank

1. The document contains a question bank for a Computer Concepts and C Programming course. It includes short 1-mark questions and longer 2-mark descriptive questions covering topics like computer hardware, software, operating systems, C programming concepts etc. 2. The questions are divided into two parts - Part A contains 1/2 mark multiple choice questions, while Part B contains descriptive questions requiring explanations and diagrams worth between 3-10 marks each. 3. The questions are meant to assess students' understanding of fundamental computer and programming concepts through testing of definitions, explanations of processes, comparisons and writing small programs.

Uploaded by

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

CCP - Question Bank

1. The document contains a question bank for a Computer Concepts and C Programming course. It includes short 1-mark questions and longer 2-mark descriptive questions covering topics like computer hardware, software, operating systems, C programming concepts etc. 2. The questions are divided into two parts - Part A contains 1/2 mark multiple choice questions, while Part B contains descriptive questions requiring explanations and diagrams worth between 3-10 marks each. 3. The questions are meant to assess students' understanding of fundamental computer and programming concepts through testing of definitions, explanations of processes, comparisons and writing small programs.

Uploaded by

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

Malnad College of Engineering, Hassan

Department of Computer Science and Engineering


I Semester B.E (Autonomous) in CS & Engg
Computer Concepts and C Programming (CS105)

QUESTION BANK
Note: All the questions are only indicative and the same questions may not appear in the SEE.

Part A - 1/2 Marks Questions


1 mark questions:
1. Who is called the father of computer?
2. Which is the most powerful type of computer?
3. Mention the main unit of the computer.
4. List all the individual user computers.
5. Which type of computers are called mid range computers?
6. Which is the device used to write the content directly on the screen?
7. What is a computer?
8. What is data?
9. What is information?
10. What is a byte?
11. What is a nibble?
12. What is a program?
13. Define operating system?
14. What is software?
15. What is hardware?
16. What is application software?
17. What is system software?
18. What is a compiler?
19. What is an interpreter?
20. List any four input devices.
21. List any four output devices.
22. List different types of printers.
23. What is a primary memory?
24. What is a secondary memory?
25. Which is the command used to create directory in MS-DOS?
26. Which is the command used to clear the screen in MS-DOS?
27. Which the command used to copy the content of one file to another?
28. Which is the command to list all files and sub directories in UNIX?
29. What is an algorithm?
30. What is a flowchart?
31. Who invented C language?
32. Expand ANSI.
33. Expand ASCII.
34. What is a comment statement in C?
35. What is the extension for a C file?
36. Where the C program begins its execution?
37. What is a preprocessor directive?
38. What is a C token?
39. List the 6 types of C tokens?
40. What is a keyword?
41. What is an identifier?
42. What is a Constant?
43. List all primary data types.
44. What is the size and range of ‘int’ data type on a 16-bit machine?
45. How do you declare variables in C?
46. What is a symbolic constant?
47. How symbolic constants are defined in C?
48. What is an operator?
49. What is an expression?
50. List all arithmetic operators of C language.
51. List all relational operators of C language
52. List all logical operators of C language.
53. List all bitwise operators of C language
54. List all special operators of C language
55. What is a ternary operator?
56. Name the ternary operator in C language.
57. What is implicit type conversion?
58. What is explicit type conversion?
59. Write the precedence of arithmetic operators.
60. Which operator operates from right to left?
61. What is the use of modulus operator?
62. Write the syntax for getchar() and putchar().
63. Write the syntax of simple if statement?
64. List variants of if statement?
65. Which is the unconditional branching statement in C?
66. Which is the multi-way decision statement in C?
67. Which is the post tested looping statement in C?
68. Write the syntax of for loop.
69. What is the use of break statement inside the loop?
70. What is an array?
71. Write the syntax for creating one-dimensional array.
72. What is two-dimensional array?
73. What is a string?
74. List any two string-handling functions available in C.
75. What is a prototype?
76. What is user-defined function?
77. List different categories of user defined functions.
78. What is the default return type of a user defined function?
79. List different methods of passing parameters to C functions.
80. Define structure.
81. What is a pointer?
2 mark questions:
1. Differentiate between primary and secondary memory
2. Differentiate between impact and non-impact printers.
3. Explain information processing cycle.
4. Explain the parts of a computer.
5. List commonly used flow chart symbols.
6. Write an algorithm to find the sum of two numbers.
7. Write an algorithm to find the area of circle.
8. Write a flow chart to swap the content of two variables.
9. Write a flow chart to find simple interest.
10. How to make single and multiple line comment in C programs? Give examples.
11. Write the basic structure of C program.
12. Write the steps for executing C program.
13. Distinguish between keywords and identifiers.
14. Write the rules for creating an identifier.
15. What are the differences between constant and variable?
16. What is the use of backslash constants ‘\n’ and ‘\t’?
17. What is the difference between ‘=’ and ‘==’ operators?
18. What is the difference between pre-increment and post-increment operator?
19. Write a C program to find the largest of two using conditional operator.
20. Write the general form of printf() and scanf( )
21. List all the format specifiers used in printf( )
22. Write a C program to check if a given integer is positive or negative.
23. Write the syntax for switch statement.
24. Write the flowchart for nested if-else statements
25. Explain goto statement in C.
26. Write a C program to check whether a given number is even or odd.
27. Write the flow diagram for entry and exit controlled loop structures of C.
28. Distinguish between While and DO-While statement.
29. What is the use of continue statement?
30. What is the use of break statement?
31. How to initialize two-dimensional array.
32. Write a program to read and print five numbers using arrays.
33. Explain strcat( ) function.
34. Explain strcmp( ) function.
35. Explain strcpy( ) function.
36. Explain strlen( ) function.
37. Distinguish between actual arguments and formal arguments.
38. Write the syntax for user defined function definition.
39. Write the syntax for prototype declaration.
40. What is a prototyping? Why is it necessary?
41. Explain call-by-value method of parameter passing in user defined function
42. Explain call-by-reference method of parameter passing in user-defined function.
43. When do you prefer call by reference?
44. Explain function with no arguments and no return values.
45. Explain function with arguments and no return values.
46. Explain function with arguments and return values.
47. Write the syntax for structure declaration.
48. How structure variables are declared and initialized?
49. Distinguish between structure and arrays.
50. The main is a user-defined function. How it is different from other user-defined
functions.
51. How a pointer variable is declared?
52. Write a C program to print the address of a variable and its value using pointers.
PART B – Descriptive Questions
(Chapters 1,2,3 and 4) Introducing Computer System, Interacting with
Computer, Storing Data and Using Operating Systems

1. What is a computer? List six types of computers that are designed for use
by a single person? (5 marks)
2. Explain the use of mainframe computers in large organizations (5 marks)
3. Explain the different parts of the computer System.
(6 marks)
4. What are the four phases of information processing cycle? (3 marks)
5. Name and differentiate the two main categories of storage device. (5 marks)
6. Name and differentiate the two main categories of computer software.
(5 marks)
7. Briefly explain the working of a mouse. (5 marks)
8. Explain how a barcode reader reads a barcode and what it does with the
(3 marks)
information from barcode.
9. How do most touch screen systems work?
(5 marks)
10. How does plasma display monitor work? (3 marks)
11. How does digital light processing works? (5 marks)
12. How does a band printer work? (6 marks)
13. Explain the working of an Ink jet printer. (3 marks)
14. What are the differences between an impact printer and a non impact
printer? (5 marks)
15. How does a dot matrix printer create an image on paper? (5 marks)
16. What four factors one should consider when evaluating printers? (6 marks)
17. List four types of magnetic storage media commonly used with PCs. (5 marks)
18. Describe the functions of lands and pits on the surface of a CD. (3 marks)
19. What is an operating system? What are its functions? (5 marks)
20. What is the function of windows in a GUI? (5 marks)
21. With a neat diagram explain the functional units of a computer system. (8 marks)
22. List and explain the computers for organizations. (8 marks)
23. What is software? Explain the two major categories of software. (7 marks)
24. Explain the standard keyboard layout. (8 marks)
25. How does a colour CRT Monitor produce images on the screen? (8 marks)
26. With a neat diagram explain how a computer uses a speaker to create
(8 marks)
sound.
27. Explain size, resolution, refresh rate and dot pitch with respect to
(10marks)
monitors.
28. With a neat diagram explain how a laser printer creates a printed image. (7 marks)
29. With a neat diagram explain how an ink jet printer creates a printed
(10marks)
image.
30. List and explain the different types of operating system. (8 marks)

Chapter 5. Algorithms and Flowcharts


31. What is an algorithm? Write at least three characteristics of an algorithm. (5 marks)
32. Write an algorithm to check whether the given number is odd or even. (3 marks)
33. What is flowchart? How it is different from an algorithm? (3 marks)
34. Write a flow chart to find the biggest of given three numbers. (5 marks)
35. Explain the common symbols used in flowchart. (5 marks)
36. Write a flowchart to find the roots of a quadratic equation. (6 marks)
37. Write an algorithm and a flowchart to find the factorial of a given
(5 marks)
integer.
38. Write an algorithm to find all the roots of a quadratic equation given its
non zero coefficients. (8marks)
39. Draw the flowchart to calculate and print the sum of the following series.
(10marks)
12+22+42+162+…….up to n terms.

Chapter 6. Overview of C
40. What are the characteristics of C language? (5 marks)
41. Write a C program to calculate Simple interest given principal, rate &
(5 marks)
time.
42. Briefly explain the basic structure of a C program.
(3 marks)
43. Describe the general structure of a C program with an example to find
(7 marks)
the area of a triangle given its sides.
44. With a flowchart explain how a C program is executed.
(8 marks)
Chapter 7. Constants , Variable and data types

45. Explain the basic data types available in C language. (3 marks)


46. What is a variable? How variables are declared in C language? (5 marks)
47. Distinguish between keywords and identifiers. (5 marks)
48. List the rules to frame a variable name.
(5 marks)
49. Identify the valid variables in the following list
(4 marks)
Name, _five, _5, if, A+B, sum, int_num, amount$
50. Write a note on escape sequence characters.
(5 marks)
51. Explain the variants of int data type in C language. (5 marks)
52. Write the importance and syntactic rules for symbolic constants. (5 marks)
53. What are C tokens? Explain each of them. (10 marks)
54. Explain the fundamental data types of C with the size and range of
(7 marks)
values.
55. Enumerate the rules for writing integer, floating point and character
(8 marks)
constants.
Chapter 8. Operators and Expressions
56. List all the operators in C and explain relational operators. (5 marks)
57. Explain all arithmetic operators and their precedence. (6 marks)
58. Explain conditional operator with an example.
(5 marks)
59. Describe the features of increment and decrement operators with
(6 marks)
examples.
60. What are unary and binary operators? Explain with an example. (5 marks)
61. Evaluate the following expressions.(any expression may be given) (6 marks)
62. What is type casting? Why it is needed? Explain with an example. (6 marks)
63. List all the operators in C and write their associativity and precedence. (10 marks)
64. List and explain any four bitwise operators of C language. (8 marks)
65. Write the precedence among all arithmetic, relational and logical
(10 marks)
operators.
Chapter 9. Managing Input and Output Operations
66. Explain the scanf statement with format specifiers.
(5 marks)
67. With an example explain getchar() and putchar() functions.
(6 marks)
68. Write scanf statements to read the following data lists.
(a) 78 B 45 (b) 123 1.24 45A (c) 15-10-2007 (d)10 TRUE 20 (6 marks)

69. Explain the printf function with format specifiers.


(5 marks)
70. Give any three input and three output statements in C, with an example (10 marks)
for each.
71. Explain the formatted input and output statements
(8 marks)
Chapter 10. Decision Making and Branching
72. Explain with an example the syntax if… else statement.
(5 marks)
73. Explain with example the simple if statement and nested if statement in
(5 marks)
C.
74. Explain the syntax of switch statement with an example.
(5 marks)
75. Explain how the switch statement is executed. (6 marks)
76. What is the output of the following program?
main( )
{
int k,a;
a =10;
for(k=1;k<10;k++)
{
if ( k%2==1)
(5 marks)
a=a+k;
else
a=a – 1;
printf(“a=%d”, a);
break;
}
printf(“ The value of a = %d\n”, a);
}
77. Give the general syntax for else …if ladder. Explain it with example
program segments. (5 marks)
78. Why do you need break statement and default case statement in a switch
(5 marks)
statement? Explain.
79. Write a C program to find the area of a triangle when the three sides are
(5 marks)
given.
80. Given the length of a side, write a C program to compute surface area and
volume of a cube. (surface area = 6 a2, Volume = a3 ) (5 marks)
81. Write a C program to find the average of best three marks from the given
four test marks. (5 marks)
82. Explain briefly the advantage and disadvantage of using unconditional
(6 marks)
goto statement in a C program.
83. Using conditional operator, write a program to print the biggest of three
(5 marks)
numbers.
84. Write a C program to find the roots of a quadratic equation ax 2+bx+c=0
for all combinations of a, b, c using switch statement. (8 marks)

85. What is the difference between else if ladder and switch statement? Give (8 marks)
examples.
86. Explain the various if structures available in C. (10 marks)
87. Write C program to simulate the simple calculator (only addition,
subtraction, multiplication and division) using switch statement. (10 marks)

88. Write a C program to test and print the location of a point(x,y) in the
rectangular coordinate system(o/p like “origin”, “X-axis”, “III quadrant” etc.,) (8 marks)

89. Write and explain the syntax of switch statement. Also explain how it gets
executed. (7 marks)
90. Compare the conditional operator with if..else structure with an example (5 marks)
Chapter 11 Decision making and looping
91. Write a C program to find the factorial of the given number. (5 marks)
92. Compare the do..while & while loop control structures.
(5 marks)
93. Explain the use of break & continue statements in a loop.
(5 marks)
94. Write a C program to check whether the given number is prime or not.
(6 marks)
95. Explain for loop construct with an example.(while and do ..while may be
(5 marks)
asked)
96. Write a C program to check whether the given number is a palindrome or
(6 marks)
not.
97. Write a C program to count the occurrence of digit 5 in a given integer
(6 marks)
number.
98. Write a C program to print n Fibonacci numbes.
(5 marks)
99. Give the syntax of three types of loops in C and explain with examples. (9 marks)
100. Write a C program to generate prime numbers between a given range. (9 marks)
101. 3
Write a C program to find the sin(x) value using sine series : x – x / 3! +
x5 / 5! …. Up to n terms
(10 marks)
102. Write a program to print all the points with integer coordinates enclosed
within a circle of radius 4 units from origin (7 marks)

103. Write a C program to generate all palindromes between a given range. (8 marks)
104. Write a C program to find the sum of digits of a given integer. Also
check whether the number is a palindrome or not (9 marks)

105. Write a flowchart and a C program to find the GCD and LCM of two
(10 marks)
given integers
106. It is required to keep keying in characters till a ‘#’ is input. Then the (9 marks)
number of ‘d’s in the characters input is to be printed. Which is the loop
most appropriate for this? Write a program to perform these tasks

Chapter 12. Arrays


107. Define an array. How are arrays declared and initialized?
(5 marks)
8.
108. Write a C program to find the biggest element in an array of n real
(6 marks)
9. numbers.
109. Write a C program to search a given element in an array of N elements
0. using linear search. (5 marks)
110. Write a C program to find the transpose of a given matrix.
(6 marks)
1.
111. Write a C program to find the trace and norm of a given matrix
(6 marks)
2.
112. Write a C program to sort a given list of elements in ascending order
using bubble sort. (8 marks)
113. What are the differences between linear and binary search procedures?
Write a C program to search a given element in a given list of elements
(9 marks)
using binary search.

114. Write a C program to count the prime numbers in a set of n integer


(9 marks)
numbers.
115. Given an array of n real numbers. Write a program to find the mean and
standard deviation of these numbers. (10 marks)

116. Write a C program to multiply two given matrices A(mXn) and B(pXq) . (9 marks)
117. Write a C program to read matrices A(mXn) and B(pXq) and find their
sum and difference. (9 marks)
118. Write a C program to find the sum of principal diagonal, sum of below
diagonal and sum of above diagonal elements in a given square
(9 marks)
matrix(nXn).

Chapter 13. Character arrays & strings

119. How are strings declared and initialized?


(5 marks)
3.
120. List all the built in string functions and explain any one. (5 marks)
121. Explain strcat( ) and strlen( ) functions.
(6 marks)
4.
122. Write a C program to check whether a given string is a palindrome or
(8 marks)
5. not, with out using built in function.
123. Write a C program to accept a string and find its length with out using
6. built in function. (5 marks)
124. Explain with an example how strcmp( ) function works. (6 marks)
125. Write a C program to concatenate two given strings without using any
inbuilt function. (8 marks)
126. Write a C program to sort a given list of names using bubble sort. (10 marks)
127. Write a C program to reverse a given string without using any built in
function. Also test whether it is a palindrome or not. (10 marks)

Chapter 14. User defined functions


128. List and explain the advantages of user defined functions.
(5 marks)
7.
129. What are user defined functions? Why user defined functions are
required for large and complex programs? (6 marks)

130. Write a C function to find xy. Using the above function write a C
(6 marks)
9. program to evaluate the same.
131. Explain with example the general syntax of function in C.
(5 marks)
0.
132. Write a function to find the factorial of a number. Write a C program to
1. read a number and find the factorial using the above function. (6 marks)

133. Explain the importance and the possible syntactic structures of a return
statement. (6 marks)

134. Differentiate the following with examples


1. Global and local variables. 2. Formal and actual arguments (10 marks)

135. Write a function to calculate the factorial of a given number. Write a C


program to compute ncr = n!/(n-r)! r!. using the above function. (9 marks)

Chapter 15. Structures and Pointers

136. What is a structure? Why it is used? Explain with example.


(5 marks)
2.
137. Write a C program to enter full name and date of birth of a person and
3. display the same. (5 marks)
138. How an array of structures is defined? Explain with an example.
(5 marks)
4.
139. What is a pointer? How do you access a variable through a pointer?
(4 marks)
5.
140. Write a program to swap contents of two real numbers using pointers
(6 marks)
7.
141. Write a C program to find the sum of all the elements of an array using
(10 marks)
8. pointer.
142. Write a function to swap two numbers. Using the above function write a
(6 marks)
1. C program to read two numbers and swap them.

You might also like