0% found this document useful (0 votes)
24 views6 pages

Completed Math Practical

This document contains an introduction to the C programming language. It discusses the structure of a basic C program and some key features such as variables and data types, control flow statements, functions, pointers, arrays, structures, and more. C is a general-purpose, procedural programming language known for its efficiency and low-level capabilities. Learning C provides a strong foundation for understanding programming concepts.

Uploaded by

Abhay Pant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views6 pages

Completed Math Practical

This document contains an introduction to the C programming language. It discusses the structure of a basic C program and some key features such as variables and data types, control flow statements, functions, pointers, arrays, structures, and more. C is a general-purpose, procedural programming language known for its efficiency and low-level capabilities. Learning C provides a strong foundation for understanding programming concepts.

Uploaded by

Abhay Pant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Table Of Contents

Title page…………………………...................................i
Declaration..........................................................................ii
Recommendations..............................................................iii
Endorsement......................................................................iv
Acknowledgement..............................................................v
Table Of Contents..............................................................vi

CHAPTER I: INTRODUCTION
Introduction Of C programming............................................1

Chapter III: SUMARY AND CONCLUSION


Conclusion........................................................................11
BIBLIOGRAPHY...........................................................12

1
Chapter 1:
Introduction

Certainly! C programming is a powerful and widely-used programming language that was


developed in the early 1970s by Dennis Ritchie at Bell Labs. It is a general-purpose, procedural
programming language known for its efficiency, low-level programming capabilities, and the
ability to directly manipulate memory.
Here are some key features and concepts related to C programming:
1. Structure of a C Program:
A basic C program consists of functions. The main function is the starting point of execution.
Here's a simple example:
#include <stdio.h>
int main()
{
printf("Hello, World!\n");
return 0;
}
#include<stdio.h>: This line includes the standard input/output library, allowing you to use
functions like printf for output.
int main(): The main function is the entry point of every C program. Execution begins from here.
printf("Hello, World!\n");: This line prints "Hello, World!" to the console.
return 0;: Indicates that the program executed successfully.

2. Variables and Data Types:


C supports various data types such as int, float, char, double, etc. Variables are used to store
data.
int age = 25;
float height = 5.9;
char grade = 'A';

3. Control Flow:
1
C provides control flow statements like if, else, while, for, and switch for decision-making and
looping.
if (age >= 18) {
printf("You are eligible to vote.\n");
} else { printf("You are not eligible to vote.\n"); }

4. Functions:
Functions in C allow you to modularize your code. They can be declared and defined as follows:
// Function declaration int add(int a, int b); // Function definition int add(int a, int b) { return a +
b; }

5. Pointers:
C supports pointers, which are variables that store memory addresses. They provide powerful
mechanisms for memory manipulation.
int num = 10;
int *ptr = &num;
// Pointer to the address of num printf("Value at the address pointed by ptr: %d\n", *ptr);

6. Arrays:
Arrays allow you to store multiple values of the same type in a contiguous memory block.
int numbers[5] = {1, 2, 3, 4, 5};

7. Structures:
Structures enable you to group variables of different data types under a single name.
struct Person { char name[50]; int age; };
These are just the basics; C programming has many more features and concepts to explore. It's
often used in system programming, embedded systems, and other performance-critical
applications due to its efficiency and close-to-the-hardware capabilities. Learning C is a great
foundation for understanding programming concepts and languages.

2
Program Codes

3
Conclusion

4
BIBLOGRAPHY

You might also like