PYQ – PROGRAMMING WITH "C" (2418101) | SEMESTER 1ST AND 2ND (1ST YEAR) | Year 2021
Programming with "C" 2021 (OLD) PYQ.

Group A
Choose the most suitable answer from the following options: - (1*20=20)
(i) Which of the following special symbol allowed in a variable name?
(a) _ (Underscore)
(b) | (Pipeline)
(c) * (asterisk)
(d) – (hyphen)
(ii) When we use the case control structure?
(a) To choose one from multiple alternatives
(b) To switch from one instruction to another
(c) To make the execution fast
(d) None of these
(iii) To print a float values which format specifier can be used?
(a) %f
(b) %^f
(c) %Lf
(d) none of these
(iv) Which header file is designed for basic mathematical operations?
(a) math.h
(b) conio.h
(c) dos.h
(d) stdio.h
(v) One nibble equal to:
(a) 16 bit
(b) 4 bit
(c) 6 bit
(d) 8 bit
(vi) Set of instruction that perform a particular task is called:
(a) Algorithm
(b) Program
(c) Flow chart
(d) Keywords
(vii) What is the extension files by default for C program?
(a) “.exe”
(b) “ppt”
(c) “doc”
(d) “.c”
(viii) ASCII stands for:
(a) American Standard Code for Information Interchange
(b) African Standard Code for Information Interchange
(c) Asian Study Code for Information Interchange
(d) American Study Code for Information Interchange
(ix) _____________ is a process in which function calls itself.
(a) Recursion
(b) Pointer
(c) Array
(d) Structure
(x) The structure combined variables of ___________ data types
(a) Similar
(b) Dissimilar
(c) Variable
(d) None of these
(xi) The keyword “ELSE” can be used with ___________
(a) While
(b) Do
(c) If
(d) Switch
(xii) How many keywords are available in C?
(a) 36
(b) 38
(c) 24
(d) 32
(xiii) Which of the following is a palindrome number?
(a) 1231
(b) 1221
(c) 123456
(d) 126
(xiv) Size of () operator is used to calculate __________ of the data type.
(a) Size
(b) Limit
(c) Index
(d) None of these
(xv) “!=” represents:
(a) Greater
(b) Equal to
(c) Not Equal to
(d) Lesser
(xvi)
(a) Two Dimensional
(b) One Dimensional
(c) Three Dimensional
(d) None of the above
(xvii) C Language is developed by __________
(a) D. Ritchie & K. Thomson
(b) D. Ritchie & M. Mano
(c) K. Thomson & W. Stalling
(d) K. Thomson & G. Hawkins
(xviii) A variable which hold the address of another variable is known as:
(a) Array
(b) Pointer
(c) Function
(d) Structure
(xix) “Scanf ()” function is defined in which header file?
(a) stdio.h
(b) math.h
(c) cinio.h
(d) None of these
(xx) The expression x = 4 + 2 % -8 evaluates to:
(a) -6
(b) 6
(c) 4
(d) None of these
Group:-"B"
➥ Answer all Five Questions: - (5*4=20)
2. Define the basic computational model with suitable examples.
OR
Draw the flow chart for solving the quadratic equation.
3. Write a C program to swap numbers using temporary variable.
OR
Explain the basic input/output functions in C.
4. Define the relational operator with suitable examples.
OR
Write a C program to input three numbers and print the greatest number.
5. Define the switch statement with suitable example.
OR
Define if statement and if-else statement with suitable examples.
6. Write a program to compute the sum of digits of a given number.
OR
Write a program to input 10 students name and print them.
Group:- "C"
➥ Answer all Five Questions: - (5*6=30)
7. What is recursion? Write an algorithm for solving tower of Hanoi problem.
OR
Write a program to input 10 integer numbers in an array and print out only those which are prime.
8. What do you mean by structure? What are the uses of structure?
OR
Write a program to print a square of size 5 by using the character S as shown below
|
S |
S |
S |
S |
S |
|
S |
|
|
|
S |
|
S |
|
|
|
S |
|
S |
|
|
|
S |
|
S |
S |
S |
S |
S |
9. What is loop? Define for loop with syntax and examples.
OR
Compute the fractional of a given number using do while loop.
10. Write a program to evelaute the series such as 1+2+3+…….+I , where I can be a finite value? Its value should be read through keyboard.
OR
Define operator and operand used in a language with suitable example.
11. What is an array? How to declare and initialize 2-Dimensional array?
OR
What is token? How many types of tokens are used in C language.
*****
Thank you for visiting us, Hope you like our content
and its really helpful for you.
Do follow us for regular updates and if you want any specific help feel free to
ask on below.
Web Site: https://diplomaincs.in/
Contact Us: https://diplomaincs.in/contact-us
Follow us on below social handle:-
LinkedIn: https://www.linkedin.com/in/computer-scinece-and-engineering-diploma-b5917b3a1/
What’s App: https://whatsapp.com/channel/0029VaGwTZU1t90j9c1bKl0g
Facebook: https://www.facebook.com/Diploma.1234
PYQ Video References
No references available right now.
Comments & Reviews
Loading comments...