0% found this document useful (0 votes)
5 views1 page

C Programming Concepts and Assignments

Uploaded by

25bt04008
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

C Programming Concepts and Assignments

Uploaded by

25bt04008
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

C- Programming Assignment

1. What are the basic data types in C?


2. Define constant and variable with one example each.
3. What are storage classes in C? Name any two.
4. What is operator precedence?
5. Write the syntax of the if statement in C.
6. Describe the structure of a C program with a neat diagram.
7. Explain entry-controlled and exit-controlled loops with examples.
8. Compare for, while, and do-while loops with proper examples.
9. Pattern C program using for loop.
10. Write a program to perform the sorting of 10 elements in array in ascending order?
Also find the maximum and minimum of number in a list of arrays?
11. What is an array? Write its general declaration syntax.
12. What is the difference between one-dimensional and two-dimensional arrays?
13. Explain the declaration and initialization of one-dimensional arrays with an example.
14. Describe two-dimensional arrays with their syntax and example.
15. Explain any two string operations: length, compare, concatenate, or copy.
16. What is a function prototype?
17. Define recursion and explain with example.
18. What are pointer operators?
19. What is pass by value?
20. What is pointer? Give its benefits. Write a program to do swapping of two elements
using function with two pointers as arguments
21. What is function? Explain the function definition, function prototype and function call
with relative example.
22. Write a C program to find factorial of number using function
23. Write a recursive function to display the first n terms of the Fibonacci series: 0 1 1 2 3
5 8 13. (06) (b) Describe file management?
24. Explain with an example how to print the address of a variable using a pointer.
25. Explain how to declare and initialize a structure in C with proper syntax and an example
26. Explain malloc, calloc, realloc, and free with their purposes.
27. What is dynamic memory allocation? Show the use of malloc() and calloc() function
with their syntax and example.
28. Explain fopen ( ) and fclose ( ) file handling function.
29. Explain the following File Handling functions: 1. fprintf( ) 2. fputc( ) 3. fread( ) 4.
fgets( )
30. Write a C program to read the contents to a file.
31. Write a C program to Write the contents to a file.

You might also like