Learn C Programming Language By Tutorial

Learn C Programming Language By Tutorial

C programming tutorial; Through this tutorial, you will learn c programming with examples.

C language is a popular and widely used Programming language and The origin of C is closely tied to the development of the Unix operating system, originally implemented in assembly language on a PDP-7 by Dennis Ritchie and Ken Thompson, incorporating several ideas from colleagues. Eventually, they decided to port the operating system to a PDP-11.

C Programming Language Tutorial

  • C Basics
  • C Programming Operators
  • C Tutorial on Decision Making Statements
  • C Programming Loops tutorial
  • Arrays In C
  • C programming tutorial on Structures
  • Pointers in C
  • C Files Function
  • C programming Functions Tutorial
  • C Built-in Library Functions
  • C String Functions
  • C Math Functions
  • C Programming Examples

C Basic

In basic of c programming language; you will learn the following; as shown below:

  1. Turbo C++ installation
  2. First C Hello World Program
  3. C Keywords and Identifiers
  4. Comments
  5. Escape Sequence

C Programming Operators

The following are the list of operators available in the C Programming Language:

  1. Arithmetic Operators
  2. Relational Operators
  3. Logical Operators
  4. Assignment Operators
  5. Increment & Decrement Operators
  6. Conditional Operator
  7. Bitwise Operators
  8. Sizeof Operator

C Tutorial on Decision Making Statements

The following are the list of decision making statements in the C Programming Language:

  1. If Statement
  2. If Else Statement
  3. Else If Statement
  4. Nested If Statement
  5. Break Statement
  6. Continue Statement
  7. Goto Statement
  8. Switch Statement

C Programming Loops tutorial

In C Programming, three loops for, while and do while loops; as shown below in list:

  1. While Loop
  2. Do While Loop
  3. For Loop

Arrays In C

Arrays are a collection of values with the same data type. C supports one-dimensional arrays, two and multi-dimensional arrays.

  1. Array in C
  2. One Dimensional Array
  3. Two Dimensional Arrays
  4. Multi-Dimensional Arrays

C programming tutorial on Structures

  1. Structure Introduction
  2. Structures and Functions
  3. Array of Structures
  4. Union
  5. Difference between Structure and Union

Pointers in C

  1. Pointer Introduction
  2. Passing Pointers as Function Arguments

C Files Function

The following are the list of C programming functions that support the Files operations. You can use them to perform the required file operation.

  1. Gets
  2. fputc – Write Character to File
  3. fputs – Write String Data to File
  4. fgetc – Read Character from File
  5. fgets – Read String Data from File

C programming Functions Tutorial

Functions introduction, types, and recursive functions in c programming; as shown below list:

  1. Function
  2. Pass Array to the function
  3. Pass Pointers to Functions
  4. Types of User Defined Function
  5. Recursion

C Built-in Library Functions

There are built-in library functions in c programming; as shown below list:

C Header FilesDescription
<assert.h>Program assertion functions
<ctype.h>Character type functions
<locale.h>Localization functions
<math.h>Mathematics functions
<setjmp.h>Jump functions
<signal.h>Signal handling functions
<stdarg.h>Variable arguments handling functions
<stdio.h>Standard Input/Output functions
<stdlib.h>Standard Utility functions
<string.h>String handling functions
<time.h>Date time functions

C String Functions

The following are the list of String functions available in C programming; as shown below in list:

FunctionSyntax (or) ExampleDescription
strcpy()strcpy(string1, string2)Copies string2 value into string1
strncpy()strncpy(string1, string2, 5)Copies first 5 characters string2 into string1
strlen()strlen(string1)returns total number of characters in string1
strcat()strcat(string1,string2)Appends string2 to string1
strncat()strncpy(string1, string2, 4)Appends first 4 characters of string2 to string1
strcmp()strcmp(string1, string2)Returns 0 if string1 and string2 are the same;
less than 0 if string1<string2; greater than 0 if string1>string2
strncmp()strncmp(string1, string2, 4)Compares first 4 characters of both string1 and string2
strcmpi()strcmpi(string1,string2)Compares two strings, string1 and string2 by ignoring case (upper or lower)
stricmp()stricmp(string1, string2)Compares two strings, string1 and string2 by ignoring case (similar to strcmpi())
strlwr()strlwr(string1)Converts all the characters of string1 to lower case.
strupr()strupr(string1)Converts all the characters of string1 to upper case.
strdup()string1 = strdup(string2)Duplicated value of string2 is assigned to string1
strchr()strchr(string1, ‘b’)Returns a pointer to the first occurrence of character ‘b’ in string1
strrchr()‘strrchr(string1, ‘b’)Returns a pointer to the last occurrence of character ‘b’ in string1
strstr()strstr(string1, string2)Returns a pointer to the first occurrence of string2 in string1
strset()strset(string1, ‘B’)Sets all the characters of string1 to given character ‘B’.
strnset()strnset(string1, ‘B’, 5)Sets the first 5 characters of string1 to the given character ‘B’.
strrev()strrev(string1)It reverses the value of string1

C Math Functions

The following are the list of math functions available in C programming; as shown below in list:

FunctionDescription
floor ( )This function returns the nearest integer which is less than or equal to the argument passed to this function.
round ( )This function returns the nearest integer value of the float/double/long double argument passed to this function. If decimal value is from “.1 to .5”, it returns integer value less than the argument. If decimal value is from “.6 to .9”, it returns the integer value greater than the argument.
ceil ( )This function returns nearest integer value which is greater than or equal to the argument passed to this function.
sin ( )This function is used to calculate sine value.
cos ( )This function is used to calculate cosine.
cosh ( )This function is used to calculate hyperbolic cosine.
exp ( )This function is used to calculate the exponential “e” to the xth power.
tan ( )This function is used to calculate tangent.
tanh ( )This function is used to calculate hyperbolic tangent.
sinh ( )This function is used to calculate hyperbolic sine.
log ( )This function is used to calculates natural logarithm.
log10 ( )This function is used to calculates base 10 logarithm.
sqrt ( )This function is used to find square root of the argument passed to this function.
pow ( )This is used to find the power of the given number.
trunc.(.)This function truncates the decimal value from floating point value and returns integer value.

C Programming Examples

There are list of c program examples; as shown below in list:

AuthorAdmin

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

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