Programming for Problem Solving - B.Tech 1st Semester Examination, 2024
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.
-
Which of the following is a valid variable name in C?
-
Which of these is not a valid data type in C?
-
Which of the following is the correct syntax for if statement?
-
What is the output of printf("%d", 5 + 3 * 2)?
-
Which header file is required to use printf()?
-
Which keyword is used to define a constant in C?
-
What is the index of the first element in an array?
-
Which one is the logical AND operator in C?
-
Which format specifier is used for printing float values?
-
Which of these is not a loop in C?
-
Explain the structure of a C program with an example.
-
Describe basic data types in C with memory size.
-
What is an algorithm. Write an algorithm to perform the addition of two numbers in C and draw a flowchart to represent the addition of two numbers.
-
Write a program to check whether a number is even or odd using if-else.
-
Explain Arithmetic and Logical operators in C with example programs.
-
Explain Relational and Bitwise operators with example programs.
-
Explain call by value and call by reference with examples.
-
What is the difference between library functions and user-defined functions?
-
What is an array in C programming? Write advantages of using arrays. Explain a one-dimensional array with a suitable example program.
-
Describe the difference between character array and string.
-
Write the difference Between Array and Structure in C programming.
-
Write the difference Between Structure and Union in C programming.
-
What is a pointer? Explain pointer declaration and initialization with sample program.
-
What is file? Explain text file and binary file in details.