Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary Welcome to C programming

Rating
-
Sold
-
Pages
77
Uploaded on
09-01-2024
Written in
2023/2024

This document is to study and know about the basics of c programming even for moderators you can get a complete knowledge about c programming by using this notes

Institution
Course

Content preview

C - PROGRAMMING LANGUAGE


SIMPLE NOTES




BY – S.ANTONY ALEX


FOR MORE NOTES CONTACT:





1

, TABLE OF CONTENTS



S.NO TOPICS PG.NO
1 INTRODUCTION TO C PROGRAMMING 3
2 VARIABLES AND DATA TYPES 4
3 FUNCTIONS IN C PROGRAMMING 6
4 OPERATIONS IN C PROGRAMMING 14
5 OPERATORS IN C PROGRAMMING 15
6 VARIABLES IN C PROGRAMMING 22
7 DATA TYPES IN C PROGRAMMING 25
8 MODIFIERS IN C PROGRAMMING 28
9 CONSTANTS IN C PROGRAMMING 30
10 BRANCHING STATEMENTS 34
11 LOOPING STATEMENTS 38
12 LOOP CONTROL STATEMENTS 40
13 JUMP STATEMENTS 43
14 STRINGS IN C PROGRAMMING 46
15 STRING HANDLING 51
16 POINTERS IN C PROGRAMMING 56
17 STRUCTURE AND UNION 61
18 DIFFERENCE B/W STRUCTURE & UNION 66
19 FILES IN C PROGRAMMING 67
20 FILE MANAGEMENT IN C PROGRAMMING 71




2

, C - PROGRAMMING LANGUAGE


C programming is a powerful and versatile programming language that forms the basis for many
other programming languages. Here are some basics to get you started:



Hello World Program:
The classic "Hello, World!" program is a simple way to start learning any programming language.
Example:
#include <stdio.h>


int main() {
printf("Hello, World!\n");
return 0;
}
This program uses the printf function to display the text "Hello, World!" on the console.



Comments:


You can use comments to add explanations to your code. Comments in C begin with /* and end
with */ for multiline comments, or use // for single-line comments.


/* This is a multiline comment */


// This is a single-line comment




3

, Variables and Data Types:


C is a statically typed language, meaning you need to declare the type of a variable before using
it.
Example:
#include <stdio.h>


int main() {
// Variable declaration
int age = 25;
float height = 5.9;
char grade = 'A';


// Display variables
printf("Age: %d\n", age);
printf("Height: %f\n", height);
printf("Grade: %c\n", grade);


return 0;
}



Input and Output:
You can use scanf for input and printf for output.
Example:
#include <stdio.h>


int main() {

4

Written for

Institution
Course

Document information

Uploaded on
January 9, 2024
Number of pages
77
Written in
2023/2024
Type
SUMMARY

Subjects

$7.19
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
antonyalex

Get to know the seller

Seller avatar
antonyalex FRANCIS XAVIER ENGINEERING COLLEGE
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions