C Programming Notes - VTU 2nd Year (POP)
1. BASICS OF C LANGUAGE
- Structure of a C Program
#include<stdio.h>
int main() {
printf("Hello, World!");
return 0;
- Keywords: int, return, if, else, etc.
- Data Types: int, float, char, double
- Variables & Constants
2. INPUT & OUTPUT
- scanf() and printf()
3. OPERATORS
- Arithmetic: + - * / %
- Relational: == != > < >= <=
- Logical: && || !
- Assignment: = += -=
4. CONTROL STATEMENTS
- if-else, switch-case
- for, while, do-while loops
5. ARRAYS
- Declaration and access
6. STRINGS
- Declaring and using strings
7. FUNCTIONS
- Defining and calling functions
8. POINTERS
- Declaring pointers and accessing values
9. STRUCTURES
- Grouping different data types
10. FILE HANDLING
- fopen, fprintf, fclose, etc.
Important C Programming Questions for VTU POP
1. Write a C program to find the factorial of a number using recursion.
2. Explain different data types in C with examples.
3. Write a program to check whether a number is prime or not.
4. Write a program to find the largest number in an array.
5. Write a program to swap two numbers using pointers.
6. Write a program to accept and display student information using structure.
7. Write a program to copy one string to another without using library functions.
8. Explain types of loops in C with examples.
9. Write a program to read and write data to a file.
10. Write a program to reverse a number and check if it is a palindrome.