Programming for Problem Solving - B.Tech 1st Semester Examination, 2024 (Old)
Programming for Problem Solving
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
-
Where is a program stored and executed?
-
What is the output of a compiler?
-
Which storage class has the default value of a variable as zero?
-
What is the result of 5% 2 in C?
-
What type of array is used to store string?
-
Binary search works only on:
-
Which operator is used to access members of a structure using a pointer?
-
What is the output of \( *(\&x) \) in C?
-
Which function is used to open a file in C?
-
Which of the following problems can be solved using recursion?
-
Draw a flowchart to find the largest of three numbers.
-
Explain different storage classes in C.
-
What is type casting in programming? Differentiate between implicit and explicit type conversion with examples.
-
Explain operator precedence and associativity with examples.
-
Write the differences between if, if-else, and switch statements with examples.
-
Explain the concept of pointer to pointer with a code example. What is a self-referential structure?
-
How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?
-
Explain the different modes of opening a file in C. Give examples.
-
Write a program to perform linear search in an array.
-
Describe the bubble sort algorithm and write its implementation in C.
-
What is the difference between call by value and call by reference? Explain with examples.
-
What is the scope of a variable? Explain local and global scope with examples.
-
What is recursion? Write a recursive function to compute the nth Fibonacci number.
-
What is the difference between structure and union? Explain with an example.
-
Self-Referential Structure
-
Compiler and Linker
-
Syntax and logical errors
-
Bitwise Operator