EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 600+ Courses All in One Bundle
  • Login

C Programming Tutorial

Home » Software Development » Software Development Tutorials » C Programming Tutorial

Basic

Introduction to C

What is C?

Career in C Programming

Advantages of C

How to Install C?

Best C Compilers

Data Types in C

Variables in C

C Keywords

C Commands

Command Line Arguments in C

C Literals

Constants in C

Unsigned Int in C

String in C

Pointers

Pointers in C

Null pointer in C

Function Pointer in C

Double Pointer in C

Void Pointer in C

Const Pointer in C

Dangling Pointers in C

Pointer Arithmetic in C

Operators

C Operators

Arithmetic Operators in C

Relational Operators in C

Assignment Operators in C

Logical Operators in C

Conditional Operator in C

Modulus Operator in C

Ternary Operator in C

Address Operator in C

Unary Operator in C

Operators Precedence in C

Left Shift Operator in C

Control Statement

Control Statements in C

If Statement in C

If-else Statement in C

Else if Statement in C

Nested if Statement in C

#else in C

Structure Padding in C

Nested Structure in C

Continue Statement in C

Break Statement in C

Switch Statement in C

Goto Statement in C

Loops

Loops in C

For Loop in C

While Loop in C

Do While Loop in C

Nested Loop in C

Infinite Loop in C 

Function

Math Functions in C

Hashing Function in C

Recursive Function in C

Power Function in C

fputs in C

C puts() Function

fprintf() in C

fseek() in C

Stderr in C

ASCII Value in C

strcat() in C

Inline Function in C

sizeof() in C

Function Prototype in C

C ftell()

Array

Arrays in C Programming

2-D Arrays in C

3D Arrays in C

Multidimensional Array in C

Array Functions in C

Strings Array in C

Sorting

Sorting in C

Heap Sort in C

Bubble Sort in C

Advanced

Constructor in C

Encapsulation in C

C Storage Classes

Static Keyword in C

File Handling in C

Queue in C

Hexadecimal in C 

typedef in C

Memory Allocation in C

Linked List in C

Volatile in C

Tokens in C

Expression in C

Regular Expression in C

Error Handling in C

Types of Errors in C

Preprocessor in C

Preprocessor Directives in C

fscanf() in C

#Pragma in C

#ifndef in C

#undef in C

Macros in C

What is Embedded C?

C programs

Patterns in C Programming

Star Patterns in C

Number Patterns in C

Swapping in C

Reverse Number in C

Palindrome in C Program

Factorial in C

Fibonacci Series in C

Square Root in C

Random Number Generator in C

Prime Numbers in C

Escape Sequence in C

Reverse String in C

Leap Year Program in C

Anagram Program in C

Strong Number in C

String Concatenation in C

C Programming Matrix Multiplication

Decimal to Octal in C

Expression Evaluation in C

Decimal to Hexadecimal in C

Interview question

C Programming Tutorial

C is a procedural and general-purpose programming language that is used most widely for system programming. Dennis Ritchie initially developed C in between 1972 and 1973 at Bell Labs.  American National Standard Institute (ANSI) later formalized this programming language in 1988. The initial purpose of the development of the C programming language was to make utilities of the UNIX based operating system. Directly or indirectly many other computer programming languages have taken/borrowed features from C programming language. Program written in C can be very efficiently mapped to machine instructions which make C programming very much popular to use for any embedded software application development which runs on a microcontroller.

Why do we need to learn C?

  • C is the most widely and commonly used programming language to develop the different operating systems. The popular operating systems like UNIX and LINUX are written in C.
  • C program allows programs to maintain portable and compact code along with maintaining performance and minimizing CPU constraints like memory and execution time etc.
  • C programming language allows programmers to control memory allocation and reallocation which will be very helpful while working with software development for small embedded systems.
  • C is middle-level language and very fast in terms of execution compared to other programming languages.
  • Different algorithms and data structures can be implemented using C language very efficiently which can be used in may software applications.
  • Due to the portability feature of C programming language, the C program written for one computer platform can easily be run on different other platforms with very little modification in code.
  • Various compilers that are used for other programming languages can be very efficiently designed and developed using the C programming language.

Applications of C

  • To develop and design system software like compilers for other programming languages.
  • To develop different operating systems for embedded devices and kernels.
  • To develop graphics related software like gaming application.
  • To design and develop network device software.
  • To develop a software system where memory and execution time is constraint like software for microcontrollers which is mainly used for small embedded systems.
  • Used for systems that require direct access/modification of data from memory.

Example (One short example)

To have an initial understanding of C programming language, Have a look at below sample example code where two age variables are taken as input and compared those for age comparison.

Code:

#include <stdio.h>
int main()
{
int age1 = 100;
int age2 = 80;
if (age1 > age2)
{
printf("age1 is greater than age 2");
}
else
{
printf("age2 is greater than age 1");
}
return 0;
}

Output:

C Tutorial

Prerequisites

You should have a basic understanding of computer programming language methodologies like variable, condition, looping, constants, operators, etc. Knowledge of any other programming language is an added advantage to learn this tutorial.

Target Audience

This tutorial is designed for those software programmers who wish to understand about C programming language and wish to apply C programming in their project.

Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Java Tutorials
  • Python Tutorials
  • All Tutorials
Certification Courses
  • All Courses
  • Software Development Course - All in One Bundle
  • Become a Python Developer
  • Java Course
  • Become a Selenium Automation Tester
  • Become an IoT Developer
  • ASP.NET Course
  • VB.NET Course
  • PHP Course

© 2020 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA Login

Forgot Password?

EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you
Book Your One Instructor : One Learner Free Class

Let’s Get Started

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

Special Offer - All in One Software Development Bundle (600+ Courses, 50+ projects) Learn More