स्वामी विवेकानंद ई-टेस्ट 2026 सोडवणासाठी येते क्लिक / टॅप करा.

notes and practice set for programming c

Saksham Computers - C Programming Master Notes

SAKSHAM COMPUTERS

C Programming Master Notes

Table of Contents

  1. Introduction to C
  2. Variables & Data Types
  3. Operators
  4. Conditional Statements
  5. Loops
  6. Functions
  7. Arrays
  8. Strings
  9. Pointers
  10. Structures
  11. File Handling
  12. Practice Programs
  13. MCQ
  14. Viva

Chapter 1 : Introduction to C

What is Programming?

Programming is the process of giving instructions to a computer.

Programming म्हणजे संगणकाला सूचना देण्याची प्रक्रिया.

What is C?

C is a general-purpose programming language developed by Dennis Ritchie in 1972.

Advantages of C

  • Fast
  • Portable
  • Structured
  • Efficient

Program 1 : Hello World

#include

int main()
{
 printf("Hello World");
 return 0;
}

Output

Hello World

Explanation

printf() is used to display output.


Chapter 2 : Variables & Data Types

Variable

A variable is a container used to store data.

int age=20;
float salary=15000;
char grade='A';

Program : Store Age

#include

int main()
{
 int age;

 printf("Enter Age : ");
 scanf("%d",&age);

 printf("Age=%d",age);

 return 0;
}

Output

Enter Age : 25
Age=25

Chapter 3 : Operators

Arithmetic Operators

  • +
  • -
  • *
  • /
  • %

Program : Addition

#include

int main()
{
 int a,b;

 scanf("%d%d",&a,&b);

 printf("%d",a+b);

 return 0;
}

Output

30

Practice Set

  1. Addition
  2. Subtraction
  3. Multiplication
  4. Division
  5. Area of Rectangle

Solutions

Write programs using arithmetic operators.


Chapter 4 : Conditional Statements

if

if(condition)
{
}

Program : Even Odd

#include

int main()
{
 int n;

 scanf("%d",&n);

 if(n%2==0)
 printf("Even");
 else
 printf("Odd");

 return 0;
}

Output

Enter Number : 10
Even

Chapter 5 : Loops

Entry Controlled Loop

  • for
  • while

Exit Controlled Loop

  • do while

Program : Print 1 to 10

for(i=1;i<=10;i++)
{
 printf("%d",i);
}

Output

1 2 3 4 5 6 7 8 9 10

Practice Set

  1. Table
  2. Factorial
  3. Fibonacci
  4. Reverse Number
  5. Palindrome

Chapter 6 : Functions

void display()
{
 printf("Hello");
}

Recursion Example

factorial(n)
{
 if(n==1)
 return 1;

 return n*factorial(n-1);
}

Chapter 7 : Arrays

int marks[5];

Program : Sum of Array

#include

int main()
{
 int a[5]={10,20,30,40,50};
 int i,sum=0;

 for(i=0;i<5;i++)
 sum=sum+a[i];

 printf("%d",sum);
}

Chapter 8 : Strings

char name[]="SAKSHAM";

String Functions

  • strlen()
  • strcpy()
  • strcmp()
  • strcat()

Chapter 9 : Pointers

int a=10;
int *p=&a;

Program

printf("%d",*p);

Chapter 10 : Structures

struct Student
{
 int roll;
 char name[20];
 float marks;
};

100 Important Programs

  1. Hello World
  2. Addition
  3. Area of Rectangle
  4. Simple Interest
  5. Even Odd
  6. Largest Number
  7. Leap Year
  8. Table
  9. Factorial
  10. Fibonacci
  11. Palindrome
  12. Prime Number
  13. Array Sum
  14. Array Average
  15. String Length
  16. String Reverse
  17. Pointer Example
  18. Structure Example
  19. File Handling

100 Viva Questions

  1. What is C?
  2. What is Variable?
  3. What is Array?
  4. What is Pointer?
  5. What is Structure?

100 MCQ Questions

Add chapter-wise MCQs here.


SAKSHAM COMPUTERS

C Programming Master Notes

Previous Post Next Post

Contact Form