PPS Unit Wise Important Questions PDF
Document Details
Uploaded by LivelyPerception9443
Tags
Summary
This document contains important questions for C programming, organized by units. It covers various topics, including algorithms, flowcharts, data types, operators, loops, arrays, and functions.
Full Transcript
**PPS UNIT WISE IMPORTANT QUESTIONS** **UNIT 1** 1. Develop an algorithm and flowchart of a program to find out greatest among three numbers. 2. Develop an algorithm and flowchart of a program to find out the kinetic energy of a moving object. 3. Discuss in detail the structure of C p...
**PPS UNIT WISE IMPORTANT QUESTIONS** **UNIT 1** 1. Develop an algorithm and flowchart of a program to find out greatest among three numbers. 2. Develop an algorithm and flowchart of a program to find out the kinetic energy of a moving object. 3. Discuss in detail the structure of C program correlating the concept with an example program. 4. Explain about various datatypes in c. 5. Distinguish between syntax error and logical error in C programming with suitable examples. 6. **What is an identifier? List the rules to form an identifier with an example.** 7. Illustrate the concept of operators with suitable programs. 8. Discuss about Type conversion and Type Casting with an example. 9. Illustrate operator precedence and associativity with one example. **UNIT 2** 1. Explain about conditional statements. With programs. 2. Create a C program, to accept three values from user and find maximum and minimum number between them using if-else-if ladder. 3. Explain about loops with programs. 4. **Design a switch case which takes two integer operands and one operator from the user, performs the arithmetic operation and then prints the result.** 5. Design a C program to perform all Arithmetic operations using switch case. 6. Illustrate briefly about jumping statements (break, continue, goto) with programs. 7. Write a C program that uses a decrementing loop to read 10 numbers from the keyboard (starting from 10 down to 1). Calculate their sum and average, then display the results. 8. Develop a C program to find sum of individual numbers and check the given number is palindrome or not. 9. Design a C program to demonstrate any loop to read 10 numbers from the keyboard and find their sum and average. 10. Design a C program to find out whether the given number is prime or not. 11. Compare and contrast the while loop and the do-while loop in C programming. 12. **Print Fibonacci Series for \'n\' terms.** 13. Discuss about declaration and initialization of 1-D and 2-D arrays with an example 14. Develop a C program to perform matrix Addition. 15. **Define String**? Explain string handling functions supported by C. **UNIT 3** 1. Discuss ALL categories of user defined functions with an example program each. 2. Design a C program to swap given two numbers using swap () function by passing parameters with call by value concept. 3. The concept of calling and called function with suitable example. 4. Design a user-defined function called calculate\_area that takes two arguments: length and width. The function should return the area of a rectangle calculated using the formula area = length \* width. 5. Design a program that accepts two integers from the user, swaps them using call by reference, and displays the swapped values in the main function. 6. **List out various built-in functions available in C? Give advantages of user-defined functions** **BITS** 1. Named memory locations in c referred to as \_\_\_\_\_\_\_\_\_ 2. In \_\_\_\_\_\_\_\_\_ Laboratories C was developed 3. Smallest individual unit of C is \_\_\_\_\_\_\_\_\_ 4. Size of variable or datatype is determined by \_\_\_\_\_\_ 5. If the two strings are not identical, then strcmp() function returns \[ \] a\) -1 b)1 c) 0 d) Yes 6. The last index value of Array \_\_\_\_\_\_\_\_\_\_\_\_ 7. \_\_\_\_\_\_ is referred to as exit control loop 8. \_\_\_\_\_\_\_\_used to terminate a loop irrespective of loop condition. 9. pow() is \_\_\_\_\_\_\_\_\_ type of function 10. The value obtained in the function is given back to main by using \_\_\_\_\_\_\_\_ keyword. 11. Named memory locations in C referred to as \_\_\_\_\_\_\_\_\_ 12. All keywords in C are in \_\_\_\_\_\_\_\_\_letters 13. Smallest individual unit of C is \_\_\_\_\_\_\_\_\_ 14. Representing the various steps in the form of a diagram is called as\_\_\_\_\_\_\_\_\_ 15. C was developed by \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ 16. Smallest individual unit of C is \_\_\_\_\_\_\_\_\_ 17. If the two strings are identical, then strcmp() function returns \[ \] a\) -1 b)1 c) 0 d) Yes 18. The index value of Array Starts from \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ number 19. \_\_\_\_\_\_ is referred to as entry control loop 20. Switch case terminated by \_\_\_\_\_\_\_\_. 21. If char s\[20\];Identify sizeof(s) in bytes? \[ \] a)20bytes b) 1bytes c) 4 bytes d) 10 bytes 22. What is the limit for number of functions in a C Program? \[ \] a\) 16 b) 31 c) 32 d) No Limit 23. \_\_\_\_\_\_\_\_is a name given to a memory location. 24. C consists of \_\_\_\_\_\_\_\_ keywords. 25. \_\_\_\_\_\_\_\_skips the current iteration and stops further iterations. 26. \_\_\_\_\_\_\_\_is a homogeneous collection of items. 27. Function is a\_\_\_\_\_\_\_\_\_\_. 28. Identify which is a translator program a\) Assembler b) Compiler c) Interpreter d) linker 29. x=(a&&b)\|\|(c==d). Find the value of x, where a=5, b=2, c=1, d=3 a\) 0 b) 1 c)2 d)3 30. Identify sizeof(char)? a\) 1byte b)2bytes c) 4 byes d) 8bytes 31. Ternary operator is a\) && b) ! c)?: d) \^ 32. Find length of a string \"Programming\" a)11 b) 12 c)13 d)10 33. Which among the following is NOT a logical or relational operator? a\) != b) == c) \|\| d) = 34. If the two strings are identical, then strcmp() function returns \[ \] 35. The index value of Array Starts from \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ number 36. \_\_\_\_\_\_ is referred to as entry control loop 37. Switch case terminated by \_\_\_\_\_\_\_\_. 38. The value obtained in the function is given back to main by using \_\_\_\_\_\_\_\_ keyword. 39. What is the limit for number of functions in a C Program? a\) 16 b) 31 c) 32 d) No Limit