0% found this document useful (0 votes)
10 views

Procedural Programming Practice Questions Unit Test-2

Uploaded by

SHAWN 2.0
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Procedural Programming Practice Questions Unit Test-2

Uploaded by

SHAWN 2.0
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Course Title: Procedural Programming

Course Code: UBTFY114


Credit Units: 3
Level: UG
Practice Questions for Unit Test -2

Note: Questions for UT-II may not be asked directly from the question bank.

Unit-3
1. How do you declare, initialize and access 1-Dimensional array with a simple example C program.
2. How do you declare, initialize and access 2-Dimensional array with a simple example C program.
3. Explain how 1D array can be implemented using loops with a simple example C program.
4. Explain how 2D array can be implemented using loops with a simple example C program.
5. Write a C code to accept input from the user and print the elements of 1D array.
6. C program to find smallest and largest element of the array.
7. Write c program to add all the elements of an array. Accept the input from the user.
8. Write a C code to accept input from the user and print the elements of 2D array in matrix form.
9. Write a c code to add/multiply two matrices by accepting input from user.
10. Write a c code to transpose a matrix by accepting input from the user.
11. What is string? Explain in detail with sample pseudo code/Syntax.
12. How do you declare, initialize and access character array/string with a simple example C
program.
13. Write a c program to read and print the string using unformatted input & output functions (gets ()
& puts () are unformatted input and output functions).
14. Explain the uses of gets() and puts() functions with syntax and an example for each.
15. Write C program to compare two strings using string inbuilt function. Accept two strings from
user.
16. Write C program to reverse a string using string inbuilt function. Accept two strings from user.
17. Write C program to find length of string with and without using string inbuilt function. Accept
string from user.
18. Write C program to copy two strings using string inbuilt function. Accept two strings from user.
19. Write C program to concatenate two strings using string inbuilt function. Accept two strings from
user.
Unit-4 Functions in C:

1. Explain function declaration, definition and call with necessary syntax/pseudocode or sample C
code.
2. Enlist and explain in short with necessary pseudo code/syntax/Sample C Code, categories of user
defined functions in C.
3. Write sample C code for function with no arguments and return value.
4. Write sample C code for function with no arguments and no return value
5. Write sample C code for function with arguments and no return value
6. Write sample C code for function with arguments and return value
7. Write a C code for addition of two numbers using all 4 categories of functions.
8. Write a C code to calculate average of three numbers using all 4 categories of functions.
9. Write a C code to check the given numbers is even or odd using all 4 categories of functions.
10. Differentiate between actual parameters and formal parameters.

You might also like