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

Bcom C Qbank

Bcom c programming questions bank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Bcom C Qbank

Bcom c programming questions bank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

III Semester Programming in C (Question Bank)

Short Answer Questions: CO1 (5 MARKS)

1. Write a note on History of C.


2. List and explain in brief the features of C.
3. Explain the structure of C program with the help of a block diagram.
4. Differentiate i) Keywords and Identifiers
ii) Constants and Variables (2.5+2.5)
5. What is Variable? Provide the syntax for declaring a variable. Give an example.
(2+2+1)
6. What is Variable? Differentiate assigning a value to variable and initialization of
variable. (2+3)
7. List and explain in brief the features of C.
8. Explain Basic structure of C program.
9. Explain execution of C Program.
10. Write a note on Character set of C.
11. What is Identifiers? List the rules to be followed for naming an identifier/variable?
(2+3)
12. Explain C tokens with example.
13. Write a note on Constants in C.
14. Write a note on Variables in C.

Long Answer Questions: CO1 (10 MARKS)

1. What are Constants? Explain with example #define statement in ‘C. List rules apply
to it(2+8)
2. What is Variable? Explain with examples declaring, initializing and assigning value to
variable.(2+8)
3. Explain the structure of C program with the help of an example program and block
diagram.
4. Write a note on i) Keywords
ii) Identifiers
ii) Variables
iv) Constants (2.5 each)
5. Explain Primary Data types in C with examples.
6. Write a note on History of C and importance of C.(5+5)

Computer Science Department, Dr NSAMFGC,Nitte Page 1


Short Answer Questions: CO2 (5 MARKS)

1. Explain scanf() function with syntax and example .


2. Explain printf() function with syntax and example.
3. Explain Formatted Input with example.
4. Explain Formatted Output with example.
5. Explain different output specifications with printf functions.

6. Write a C Program to find sum of integer numbers.


7. Write a C program to swap to integer numbers.
8. Write a C program to read and display float number.
9. Write a C program to read and display integer value.

Long Answer Questions: CO2 (10 MARKS)


1. Explain Formatted and Unformatted I/O with example.(5+5)
2. Explain Following Unformatted functions. i) getchar()
ii)putchar()
iii)gets()
iv)puts()
3. Write a note on History of C and importance of C.(5+5)
4. Explain Formatted I/O functions with example.
5. Explain Unformatted I/O functions with examples.

6. Write a C program to read student roll no and marks in subjects. Find total, average
and display all detail in a neat format.
7. Write a C program to read Employee information like empid and basic salary.
Calculate gross salary with DA 10% of basic salary and HRA 12% of basic salary.

Short Answer Questions: CO3(5 MARKS)

1. Explain Arithmetic Operators with example.


2. Write a note on bitwise operators available in C.
3. Explain Relational Operators with example.
4. Explain Assignment operator with example.
5. Write a note on Increment and Decrement operators.
6. Explain with example evaluation of arithmetic expression in C .
7. Explain precedence of arithmetic operators with the help of an example
expression.
8. Explain implicit type conversion with example.
9. Explain explicit type conversion with example.
10. Explain Conditional operators with example.

Computer Science Department, Dr NSAMFGC,Nitte Page 2


11. Write a note on Special Operators.

Short Answer Questions: CO4(5 MARKS)

1. Differentiate : i) Entry-controlled and Exit-controlled loops


ii) Break and Continue(2.5+2.5)
2. Explain nested if statement with the help of a code example.
3. Explain else..if ladder with the help of a code example .
4. Explain while statement with syntax and example .
5. Explain do..while statement with syntax and example.
6. Explain for statement with syntax and example.
7. Explain Switch statement with example.
8. Write a note on Goto statement.
9. Write a note on i) Break ii) Continue(2.5+2.5)

10. Write a C program to find largest of three numbers using nested if else statement.
11. Write a C program to find factorial of a number.

Long Answer Questions: CO3 (10 MARKS)

1. What are operators? Explain arithmetic and relational operators available in C.


(2+4+4).
2. What are Type conversions in C? Explain types of Conversions with example.(2+8)
3. Explain Arithmetic and Relational Operators with example.(5+5)
4. Explain Relational and Logical Operators with example.(5+5)
5. Write a note on i) Bitwise Operators
ii) Conditional Operators(5+5)
6. Specify the value of x after evaluating following expression:
i) x=3+4-7*8/5%10;
ii) float x =1.5; int y=3;
x=y/2+y*8/y-y+x/3
iii) int y=3, z=4, x; float t=4.2;
x=z*z/y+y/2*t+2+t;
iv) x= 6*2/ (2+1 * 2/3 + 6) + 8 * (8/4)

Long Answer Questions: CO4 (10 MARKS)

1. What is Decision Making and Branching? Explain different forms of if statement.


(2+8)
2. Explain the following : i) Nested loops
ii) Infinite loops
iii) Break
iv) Continue (2.5 each)

Computer Science Department, Dr NSAMFGC,Nitte Page 3


3. Explain the following: i) Goto
ii) Exit
iii) Break
iv) Continue (2.5 each)

4. Explain Nested if else and else if ladder with example.(5+5)


5. Explain While and Do..While with example.(5+5)
6. program to read numbers from keyboard continusly till the user presses 999 and to
find the sum of only positive numbers.
7. Program to read marks of five subjects, calculate percentage of marks and to display
appropriate grade declaration message.(using else if ladder)
8. program to reverse a number and find the sum of individual digits. Also check for
palindrome.

Short Answer Questions: CO5(5 MARKS)

1. What is an array? Differentiate one-dimensional and two-dimensional arrays.(2+3)


2. What is an array? How to initialize a one-dimensional array in C. Give an example.
(2+2+1)
3. What is an array? How to initialize a two-dimensional array in C. Give an example.
(2+2+1)
4. What is a string? How to declare and initialize string variable? Give example.(2+2+1)
5. Explain one-dimensional array with the help of suitable code example.
6. Explain two-dimensional array with the help of suitable code example.
7. Explain memory representation of two dimensional array.
8. Explain the different ways available for the initialization of string variable.
9. Write a note on arithmetic operations on strings.
10. Explain searching an element in one array with example.
11. Explain sorting an array element with example.

12. Write a C program to print an array elements


13. Write a C program to print an array in reverse order.
14. Write a C program to calculate sum of an array.
15. Write a C program to calculate average of an array.
16. Write a C program to search for a number in a list of numbers using one-dimensional
array.

17. Write a C program to count number of elements in an array.


18. Write a C program to print a string in C.

Long Answer Questions: CO5(10 MARKS)

Computer Science Department, Dr NSAMFGC,Nitte Page 4


1. Explain one and two dimensional arrays with suitable code example.
2. Write a note on sorting and searching in arrays.
3. What is String? Explain declaring and different ways available for the initialization of
string variable with example.
4. Write a C program to search for a number in a list of numbers using one-dimensional
array.
5. Write a C program to find the largest and smallest element of an array.
6. Write a C program to read two strings and Check whether they are palindrome or not.

7. Write a C program to count number of vowels, digits and special characters present in
String.

Computer Science Department, Dr NSAMFGC,Nitte Page 5

You might also like