Overview

In this C Tutorial you will learn C starting from introduction of C, Installation, C First Program, Data types in C, Variable and constant in C, Keywords and Comments, Operators, if statements, Loops, Array, Functions, Pointers and Dynamic memory allocation, Strings, Structure and Union, File Handling in C, Storage Classes, Programs in C. This C tutorial is your first step to learn C and master this top programming language.

Watch this C Programming and Data Structure by Intellipaat:

C Programming Tutorial – Learn C Programming from Experts Overview In this C Tutorial you will learn C starting from introduction of C, Installation, C First Program, Data types in C, Variable and constant in C, Keywords and Comments, Operators, if statements, Loops, Array, Functions, Pointers and Dynamic memory allocation, Strings, Structure and Union, File Handling in C, Storage Classes, Programs in C. This C tutorial is your first step to learn C and master

The core functionalities of C which have made it a widely accepted programming language:

  • Considered as the mother of all the modern programming languages
  • Used for low-level system programming, i.e., kernel, drivers, etc.
  • Is a middle-level language as it supports both the lower and upper-level languages.

C vs C++

C++ is the successor of C, but there are some cases when programmers prefer C over C++. The following table will give you a quick view of the comparative analysis of C and C++:

CC++
Structural languageObject-oriented language
Function-drivenObject-driven
Middle-level languageHigh-level language
Functional programming supportedSupports partial functional programming

This C tutorial includes all the aspects of this programming language so you learn C the right way. As part of this C tutorial, you will have enough hands-on coding and theoretical knowledge so you learn C.

C Tutorial Video:

Table of Contents

Getting started with C

Introduction: C is a High level, General purpose programming language which was initially used for system development work. It was accepted as a system development language because it generates the code that runs almost as fast as the code written in assembly language. C is a: Procedural language Structured Language High level Language Easy to learn It can be compiled Read More

Installation – C Tutorial

Setting up the environment: There are many compiler used for C. But generally Turbo c++ is most popularly used. To install the Turbo C software, you need to follow following steps- Step 1 - First of all download the Turbo C++ software from https://turboc.codeplex.com/downloads/get/1489512 Step 2 - Extract "Turbo C++ 3.0.zip" file Step 3 - Double click on the install.exe file Read More

Hello World

First C Program: A C program basically consists of the following parts: Preprocessor Commands Functions Data types Variables Statements & Expressions Comments Watch this C Programming & Data Structure by Intellipaat: Hello Program in C Open C console and write the following code: #include <stdio.h> #include <conio.h> void main() { clrscr(); printf("Hello C "); getch(); } Now click on the compile menu to compile the program. Read More

Data Types in C

What is a Data Type in C: Data type is used to specify the type of data. Type Data types Basic Data Type int, char, float, double Derived Data Type array, pointer, structure, union Enumeration Data Type enum Void Data Type void Basic Data Types Type Storage size Value range char 1 byte -128 to 127 or 0 to 255 Read More

Variables and Constants in C

Variables in C: Variable is used to store the value. As name indicates its value can be changed or also it can be reused many times. Syntax  Data type variable_name; e.g.  int a; Where a is the variables. There are many types of variables in c: local variable global variable static variable external variable Automatic variable 1. Local variable – Read More

Keywords and Comments

 Keywords : Keywords are the reserved words which are used for specific purpose. It cannot be used as variable, constants.in C are - auto break case char const continue default do double else enum extern float for goto if int long register return short signed sizeof static struct switch typedef union unsigned void volatile while Watch this C Programming & Read More

Operators in C

Operators: are used to perform operations.  are the symbols which perform the operation on the some values. These values are known as operands. There are following types of operators to perform different types of operations in C language: Arithmetic Relational Logical Assignment Bitwise Misc   1. Arithmetic Operator Operator Name Description Example Read More

Decision making in C

What is Decision making?: The ability to change the behavior of a piece of code which is based on certain information in the environment is known as conditional code flow.   if Statement If statement is used to test a condition, if condition is true then the code inside the if statement is executed otherwise that code is not executed. Read More

Loops in C

What are Loops in C?: Loop is used to execute the block of code several times according to the condition given in the loop. It means it executes the same code multiple times so it saves code and also helps to traverse the elements of an array. There are 3 types of loop – while loop do - while loop Read More

Functions in C

What are Functions in C?: Function is the collection of statements which is used to perform some specific task. It provides code reusability and code optimization. Syntax to declare function in C return_type function_name(data_type parameter...){ //code } return_type indicates the data type of the return value. function_name specify the name of the functions. Parameter are the values which is passed Read More

Arrays in C

What are arrays in C?: Array is a collection of elements which are of similar types. Array is very useful in C. Suppose we want to store 50 students marks then for this purpose we need to use 50 variable which is not possible and hard to manage so to avoid this situation we use array in which 50 students Read More

C Strings

What is Strings?: String is a collection of characters. It is a one dimensional array of characters. There are two ways to declare string in c language. 1. By char array 2. By string literal Watch this C Programming & Data Structure by Intellipaat: Declaring string by char array char c[11]={'i', 'n', 't', 'e', 'l', 'l', 'i', 'p', 'a', 'a', 't' ,’\0'};   Declaring string by string literal char Read More

Pointers and Dynamic memory allocation

What are Pointers in C: It is a variable which is used to store the address of another variable. Advantages of pointer Return multiple values from function Access any memory location Improves the performance Reduces the code Used for dynamic memory allocation Used in arrays, functions and structures Symbol   Name    Description & address of operator Determines the address Read More

Structures and Unions in C

What are Structures in C?: Structure stores the different types of elements i.e heterogeneous elements. The struct keyword is used to define structure. Syntax struct structure_name { data_type member1;   data_type memeberN; }; Watch this C Programming & Data Structure Video by Intellipaat: Declaring structure variable You can declare structure variable in two ways:- 1. By struct keyword within main() function 2. Read More

File Handling in C

What is File Handling in C: File handling is used to store the data permanently in files. It is used to open, store, read, search or close files. Functions Use fopen() opens new or existing file fprintf() write data into file fscanf() reads data from file fputc() writes a character into file fgetc() reads a character from file fclose() closes Read More

C Storage Classes

What are the Storage Classes in C: It defines the scope, visibility and life time of variable. There are 4 types of storage classes in C: auto register extern static   1. auto - It is the default storage class for every local variables. When a function is called they are created and when the function exits they are destroyed automatically. Read More

Some Programs in C

C Programming Examples with Output: 1. Write a program to check whether the given number is prime or not Prime Number - Prime numbers are those numbers which has no positive divisor other than 1 and itself. Example #include<stdio.h> int main() { int i,n,p=0; printf("enter the number"); scanf("%d",&n); for(i=2;i<n;i++) { if(n%i==0) { p=1; break; } } if(p==0) { printf("Number is Read More

Recommended Videos

Leave a Reply

Your email address will not be published. Required fields are marked *