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

c programming question bank

The document is a question bank for the MCA first semester course on Problem Solving and Programming, covering various units and topics related to algorithms, programming concepts, and the C programming language. It includes both short answer questions and detailed discussion prompts across multiple units, focusing on definitions, algorithm analysis, data types, control structures, and more. The content is structured into parts A and B for each unit, providing a comprehensive set of questions for students to study and prepare for exams.

Uploaded by

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

c programming question bank

The document is a question bank for the MCA first semester course on Problem Solving and Programming, covering various units and topics related to algorithms, programming concepts, and the C programming language. It includes both short answer questions and detailed discussion prompts across multiple units, focusing on definitions, algorithm analysis, data types, control structures, and more. The content is structured into parts A and B for each unit, providing a comprehensive set of questions for students to study and prepare for exams.

Uploaded by

Hari Priyan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Visit : Civildatas.blogspot.

in

www.universityquestions.in
FIRST SEMESTER – MCA

MC7102 – PROBLEM SOLVING AND PROGRAMMING

QUESTION BANK

UNIT – I

PART – A

1. Define problem definition phase.


2. Define: Asymptotic notation.
3. What is meant by time complexity?
4. What is meant by stepwise requirement?

t.in
5. List the qualities and capabilities of good algorithms.
6. What is a program?
7. Justify the need for analysis of algorithm.

o
8. Define: Space Complexity.
9. Define algorithm analysis. sp
og
10. What do you meant by average case analysis and worst case analysis?
11. What is meant by Input and Output assertions?
.bl

12. Define Probabilistic average case analysis.


13. List out the problem solving strategies.
tas

14. What is meant by dynamic programming.


15. Define Debugging programs.
da

PART-B
vil

1. Explain the various measures of efficiencies of algorithm.


Ci

2. Discuss the various concepts of computer problem solving aspect with a


suitable example.
3. Explain top-down design concepts in detail.
4. Explain program verification in detail.
5. Explain the implementation of an algorithm
6. Explain complexity of an algorithm.
7. Explain the analysis of algorithms.
8. Explain the Efficiency of Algorithms.
9. Discuss in detail features of the top down design and bottom up design
approaches in problem solving.
10. Explain how an algorithm is analyzed for best, worst and average cases for
time and space.

www.universityquestions.in
Visit : Civildatas.blogspot.in
Visit : Civildatas.blogspot.in
www.universityquestions.in
UNIT II

PART A

1. What is a program?
2. What is an algorithm and properties of an algorithm?
3. List the building blocks for a simple program.
4. Write a short note on pseudo code?
5. What is Debugging?
6. What is meant by application software and mention the example also.
7. Define Loader and Linker.
8. Write an algorithm for swapping two integer values.
9. Draw a flow chart for computing Fibonacci numbers.
10. Define Flowchart.
11. List the qualities and capabilities of goog algorithm
12. Develop an algorithm for conversion of Celsius to Fahrenheit and vice versa

t.in
13. Distinguish between compiler and Interpreter
14. Draw a flow chart for simple interest problem.

o
15. What is meant by testing?
16.
17.
What is meant by Documentation?
Define Verification sp
og
18. Define program Execution.
19. Write pseudo code for sum of n numbers.
.bl

20. List the steps for program life cycle phases.


21. Why flowchart is important in writing a program.
tas

PART B
da

1. Explain the structured programming approach


vil

2. Explain the guidelines for drawing a flowchart and write the symbols also.
3. Explain Language Translators
Ci

4. Explain Programming Languages and its Classifications


5. Write an algorithm for finding the Prime Numbers from 1 to 100
6. Draw the flowchart to solve Quadratic equations.
7. Explain the Benefits of Flowchart and Limitations of flowcharts
8. Describe the classification of programming languages.
9. Write short notes on the following
10. (i) Compiler (ii) Interpreter (iii) Loader (iv) Linker
11. Explain Building blocks concept for simple programs with example
12. Explain programming life cycle phases.
13. Explain Pseudo concepts, Benefits and Limitations.
14. Explain programs and programming concepts
15. Explain the need for documentation and testing a program.
16. What are the building blocks of a program

www.universityquestions.in
Visit : Civildatas.blogspot.in
Visit : Civildatas.blogspot.in
www.universityquestions.in
17. What is pseudo code? Write a pseudo code for finding the sum of n numbers and
its average. Draw the flow chart for the same.

UNIT – III

PART- A
1. What are the different data types in C?
2. Distinguish between character constant and symbolic constant.
3. Write an algorithm for swapping two integer values.
4. Write a short note on Logical operators in C language.
5. Give the syntax of Nested if statement and while loop statement.
6. Distinguish between character constant and symbolic constant.
7. Explain Variable.
8. What is a data type of a variable? Illustrate.

t.in
9. What is an entry controlled loop?
10. Differentiate between Entry controlled loop and Exit controlled loop.
11. Write short note on Conditional operator?

o
12. Write any four trigraph sequences with translation?
13. Give the syntax of switch statement. sp
og
14. What are the different data types available in ‘C’?
15. What are Keywords?
.bl

16. What is an Operator and Operand?


17. What is ternary operators or Conditional operators?
tas

18. What are the Bitwise operators available in ‘C’?


19. What are the logical operators available in ‘C’?
20. What is the difference between Logical AND and Bitwise AND?
da

21. What is the difference between ‘=’ and ‘==’ operator?


22. What is type casting?
vil

23. What is conversion specification?


24. What is the difference between ‘a’ and “a”?
Ci

25. What is the difference between if and while statement?


26. What is the difference between while loop and do…while loop?
27. What is a Modulo Operator?
28. How many bytes are occupied by the int, char, float, long int and double?
29. What are the types of I/O statements available in ‘C’?
30. What is the difference between ++a and a++?
31. What is a String?
32. What is a global variable?
33. What are the Escape Sequences present in ‘C’
34. Construct an infinite loop using while?
35. What will happen when you access the array more than its dimension?
36. Write the limitations of getchar( ) and sacnf( ) functions for reading strings.
37. What is the difference between scanf() and gets() function?
38. What is meant by Control String in Input/Output Statements?
39. What is the output of the programs given below?

www.universityquestions.in
Visit : Civildatas.blogspot.in
Visit : Civildatas.blogspot.in
www.universityquestions.in
main() main()
{ {
float a; float a;
int x=6, y=4; int x=6, y=4;
a=x/y; a=(float) x/y;
printf(“Value of a=%f”, a); printf(“Value of a=%f”,a);
} }
40. What is the output of the following program when, the name given with spaces?
main()
{
char name[50];
printf(“\n name\n”);
scanf(“%s, name);
printf(“%s”,name);
}
41. What is the difference between while (a) and while (! a)?

t.in
42. Why header files are included in ‘C’ programming?
43. List out some of the rules used for ‘C’ programming.

o
44. Define delimiters in ‘C’.
45. What do you mean by variables in ‘C’? sp
46. List the difference between float and double datatype.
og
47. Differentiate break and continue statement
48. List the types of operators.
.bl

49. Distinguish between while..do and do..while statement in C.


50. Compare switch( ) and nestedif statement.
tas

51. Distinguish Increment and Decrement operators.


52. Give the syntax for the ‘for’ loop statement
da

53. What is the use of sizeof( ) operator?


54. What is a loop control statement?
vil

55. What are global variable in ‘C’?


56. Write a program to swap the values of two variables (without temporary variable).
Ci

57. Write short notes about main ( ) function in ’C’ program.

PART B

1. Discuss the different operators in C


2. Write a C program to find the biggest number among three given numbers.
3. Write a note on input-output statements in C
4. Write a program in C would add the digits of a given Integer. Fox example: input
348, output = 3+4+8=15
5. Explain Decision making statements with example.
6. Explain constants and state the rules
7. Explain Looping statements with example
8. Explain break and continue statement
9. Write a C program to check the given year is leap year or not
10. Write a C program to solve a Quadratic Equation.

www.universityquestions.in
Visit : Civildatas.blogspot.in
Visit : Civildatas.blogspot.in
www.universityquestions.in
11. Explain Expressions with example
12. Explain structure of C program
13. Write a C program to find the sum of the series
x+3x/4!+5x/5!+7x/6!+……….
14. Explain operators with examples
15. Explain switch statement with example
16. Explain formatted input and output statement with its proper Syntax and an
example
17. Explain in detail the various decision making statements with suitable examples
for each of them
18. Write a C program to find the number of and sum of all integers greater than 100
and less than 200 that are divisible by 7.
19. Write a program to find the average of 10 numbers.
20. Explain in detail the various branching statements with suitable flow charts for
each of them.

t.in
UNIT IV

o
PART A
sp
og
1. Define an Array. Give example.
2. List out the features of Arrays.
.bl

3. Is it possible to declare an array subscript with float data type?


4. What are the main elements of an array declaration?
tas

5. What are the drawbacks of Initialization of arrays in C?


6. What will happen when you access the array more than its dimension?
7. What are the different ways of initializing array?
da

8. How to create a two dimensional array?


vil

9. What is the use of ‘\0’ and ‘%s’?


10. What is a String?
11. What is the starting index of an array?
Ci

12. Is it address operator used in scanf() statement?


13. What is the role of strrev()?
14. Distinguish between one dimensional and two dimensional array.
15. How to initialize a string? Give an example.
16. Differentiate between Linear search and Binary search.
17. Write the output of the following Code:
i. main()
ii. { char x;
iii. x = ‘a’;
iv. printf(“%d \n”,x);
v. }
18. Specify any two methods of sorting.
19. List out the operations that are performed on character strings.

www.universityquestions.in
Visit : Civildatas.blogspot.in
Visit : Civildatas.blogspot.in
www.universityquestions.in
20. Write the output of the following Code:

main()
{
static char name[]=”Kagz WrxAd”
int i=0;
while(name[i]!=’\0’)
{ printf(“%c”,name[i]);
i++;
}

21. What is pointer? How will you declare it


22. What is a pointer to a pointer?
23. What are the operations that can be performed on pointers?
24. What is pointer arithmetic?
25. What is a void pointer and a null pointer?

t.in
26. What is formal parameters and actual arguments
27. Why is pointer arithmetic not applicable on void pointers?

o
28. What is user-defined function?
29. What is meant by library function
30. Write the syntax for function declaration
sp
og
31. What are the two parts of function definition
32. Write the general form of header of a function
.bl

33. What is meant by pass by value and pass by reference?


34. What is a function call ?Give an example of a function call
tas

35. What is default arguments and command line arguments?


36. What is a recursive function?
da

37. Differentiate Direct and Indirect recursion


38. Differentiate Tail and Non Tail recursion
vil

39. What is linear recursion


40. What is a function pointer
Ci

PART B

1. Write a program to reverse a string.


2. Discuss about string handling functions
3. Explain array concepts with examples
4. Explain the need for user-defined functions
5. Write a c program for standard deviation problem.
6. Explain the pointers concepts and how to access a pointer variable.
7. Write a program in C to find the transpose of given matrix.
8. Explain the concepts of recursion with a sample recursion program
9. Explain the difference between call by value and call by references
10. Write a program in C multiply by the two given matrices.
11. Explain Dynamic memory allocation
12. Write a C program to find the given string is palindrome or not.

www.universityquestions.in
Visit : Civildatas.blogspot.in
Visit : Civildatas.blogspot.in
www.universityquestions.in
13. Explain pointers concepts in C with example
14. Explain storage classes with example.
15. Explain string handling functions with examples
16. Write a C program to sort a list of numbers
17. Discuss the various categories of functions with suitable programs
18. Write a C program in C to find the transpose of a given matrix
19. Write a C program to find the number of words available in a string.
20. Explain one dimensional array & two dimensional arrays with example.
21. Write a C program to find largest and smallest elements in a list of numbers
22. Write a C program using pointers to read an array of characters and print in
the reverse order.
23. Write an algorithm and a C program to arrange the given list of numbers in
ascending order.
24. Write an algorithm and a C program to find the product of two square
matrices.

t.in
UNIT V

o
PART A sp
og
1. Differentiate between arrays and structure.
2. What is meant by nested structure?
.bl

3. Define: fseek(), rewind(), eof() and ftell().


4. What is meant by Union?
tas

5. What is meant by enumeration type?


6. What is meant by bit fields?
da

7. List the qualities and capabilities of good algorithms.


8. What is the difference between break and continue statement.
vil

9. Define: File Pointer.


10. What is meant by typedef and give syntax.
Ci

11. Define: fgetc() and fputc().


12. What is meant by structure initialization?
13. Define: Space Complexity.
14. What is a structure?
15. What are command line arguments?
16. What are the various operations on structure?
17. How the members of structure object is accessed?
18. What is nested structure?
19. How typedef used in structure?
20. What are the operations on union objects?
21. What is enumeration type?
22. What are the operations of enum?

www.universityquestions.in

Visit : Civildatas.blogspot.in
Visit : Civildatas.blogspot.in
www.universityquestions.in
PART - B

1. What are the file processing commands in C? Explain.


2. Write a C program to create a file by accepting the data through console.
3. Write a C program to read student roll number, name, five subject marks and to
print the sum, average and grade using structure concepts.
4. Explain structure concepts with example.
5. Explain command line arguments with example.
6. Explain union concepts with example.
7. Using the concept of nested structures, define a structure called ‘salary’, which
has two more structures, namely ‘allowances’ and ‘deductions’ inside it. Illustrate
as to how the salary of ten employees of an organization would be read.
8. Write a C program to open a file and to write into it details related to employees
in an organization.
9. Explain Break and Continue statement with example.

t.in
10. An employee can apply for a loan at the beginning of every six months, but he
will be sanctioned the same, according to the following company rules:

o
Rule1: An employee cannot enjoy more than two loan.
sp
Rule2: Maximum permissible total loan is limited.
Write a program to process the loan applications and to sanction loans to the
og
employees.
11. Differentiate between structure and union with example.
.bl

12. Write a C program to create a file by accepting integer numbers and stored in a
file to read content from the file to find even numbers and store it in a separate
tas

file.
13. Write short notes on (i) Bit Fields (ii) Enumeration types and (iii) Typedef
14. Explain sequential file and random access file concepts.
da

15. Explain about pointers to structures, array of structures and nested structures.
vil

16. Define a structure that can describe a student. It should contain members that
include name, date of birth, and marks for three subjects. Write a program to
Ci

read the data for 5 students and calculate the average mark for every student
and display the details.
17. Write a program to generate a data file containing the list of customers and their
telephone numbers. Write functions to find the telephone number of a given
customer and to find the customer details if the telephone number is specified.

www.universityquestions.in

Visit : Civildatas.blogspot.in

You might also like