C Programming - Unit Wise Questions

Questions Organized by Units
Unit 1: Programming Language
20 Questions

11. What is software process model? Differentiate between cohesion and coupling in programming. [1+4]

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

1.Which of the following doesn't require an & for the input in scanf()?

a) char name[10];    b) int name[10];    c) float name[10];    d) double name[10];

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

12. Define keyword and identifiers. Explain rules for defining valid identifiers. [2+3]

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

2. What is the memory size of float data type in C?

a) 4 Bytes    b) 8 Bytes    c) Depends on the system/complier    d) Cannot be determined.

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

13. List the operators used in C on the basis of utility. Explain the concept of bitwise operator. [2+3]

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

3. What will be the output of the following C code?

a) 6    b) 8    c) 7    d) 9

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

14. Differentiate between while loop and do while loop. Write a C program to find input number is prime or composite. [2+3]

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

4.Which keyword is used to come out of a loop only for that iteration?

a) break    b) continue    c) return    d) void

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

15. What is DMA? Write a program to find the largest and smallest number in a list of N number using DMA. 1+4]

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

5. Bitwise operators can operate upon?

a) Double and chars    b) floats and doubles    c) int and floats    d) int and chars

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

16. What is difference between binary file and text file? Write a C program to write some text "Welcome to BCA program" in a file test.text. [2+3]

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

6.In C, if you pass an array as an argument to a function, what actually gets passed?

a) Value of elements in an array.   

b) First element in an array.

c) The address of first element in an array.

d) The address of last element in an array.

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

7.Which operator is used to access the members of structure using structure variable?

a) Address operator (&)    b) Dot operator (.)    c) Pointer operator (*)    d) Arrow operator (→)

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

17. Explain any four graphics functions in C. Write a program to draw two concentric circles with center (50, 50) and radii 75 and 125. [2+3]

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

8. Which function is used to record input from file?

a) ftell()    b) fwrite()    c) fprintf()    d) fread()

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

9. Which of the following is a keyword used for a storage class?

a) printf    b) goto    c) external    d) break

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

18. What is one dimensional array? How it is initialized? Write a C program to find the sum of two matrix of order m×n. [1+1+8]

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

10. What will be the size of following union declaration?

union test

{

int x;

char y;

float z;

}

a) 8 bytes    b) 13 bytes    c) 1 byte    d) 4 bytes

1 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

19. Define structure and union? Write a C program using structure that reads the records of 35 students with members roll, name, address and makes and display the record of students who have obtained greater than 250 marks. [2+8]

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

20. What is function? List its advantages. Explain the concept of function call by value

and function call by reference with example. [1+2+7]

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

Unit 2: Programming Technique
0 Questions
Unit 3: Basic concept of C
0 Questions
Unit 3: Input and Output
0 Questions
Unit 4: Operators and Expressions
0 Questions
Unit 6: Control Structure
0 Questions
Unit 7: Array
0 Questions
Unit 8: User Defined Function
0 Questions
Unit 9: Pointer
0 Questions
Unit 10: Structure
0 Questions
Unit 11: Data File Handling
0 Questions
Unit 12: Introduction to Graphics
0 Questions