Skip to content
  • Linkedin
  • Youtube
  • Pinterest
  • Home
  • Privacy Policy
  • About
  • Contact
Programmingoneonone

Programmingoneonone

Programmingoneonone is a website that publishes daily tutorials, methods, guides, and articles on IT, Education, and technology.

  • Home
  • Human Values
  • DSA
  • IoT Tutorials
  • Interview Questions and Answers
  • Toggle search form
basic of c programming

Basics of C Programming

Posted on 11 August 202020 May 2023 By YASH PAL No Comments on Basics of C Programming

C is called a procedural programming language because it follows a specific process to develop the program. it was initially developed by Dennis Ritchie in 1972 at Bell Laboratory. it was mainly developed to write an operating system. so it is also called a system programming language.

For an programmer it always need to know about the basics concepts of c programming

By – a programmer

because it is a fast-compiled programming language. most programming languages like C++, java, and javascript copy the syntax, and way of c programming. and C++ is the almost second copy of c programming.

what we are going to learn in this tutorial

  1. C Programming Introduction
  2. Basics concepts of c programming
  3. Keywords in C programming
  4. Simple c program

After reading this tutorial you should have basics knowledge of c programming. before we get started with c programming let’s take a look at the Versions of c programming.

c programming versions
C programming versions

for the first time when the c was created in 1972. it was not c programming because it was lower-scale programming.

Basics Concepts of C Programming

Before you get started with c programming you should have at least basic knowledge of c programming.

#include

this syntax is used to include one source file or header file into the program or file.

<stdio.h>

It is a header file that defines the standard stream objects that input and output data.

printf

It is a function that is used to generate the output or print the message on the output screen.

scanf

It is a function that is used to scan the user inputs using the format specifiers.

argument

It is a piece of data that is passed into a function or program. it is also known as parameters and has two types of actual and formal parameters.

break

It is an inbuilt keyword that is used to exit from the loop and statements.

continue

It is an inbuilt keyword that is used to escape the lines of code or terminate the current iteration.

heap

It is a pool of memory that is used for the allocation of dynamic memory in the program.

exception

The error or code that occurs when the program is executing is called an exception.

int

It’s a data type keyword that is used to allocate the integer values like 1 to 9 and its combinations.

float

It’s a data type keyword that is used to allocate floating-point values like 1.2 or 1.01 etc.

char

It’s a data type keyword that is used to allocate the character variable like a to z.

array

It’s a data structure that is used to store the collection of the same type of values.

pointer

It is used to store the address of a variable or object.

sizeof()

It’s a function that is used to find the size of an object or variable or it returns the length of the variable.

void

It is a keyword that is used to store the absence of value in a variable.

union

It is a user-defined data type that allows us to store different data types in the same memory location.

structure

It is a user-defined data type that groups related variables of different data types.

Keywords in C programming

Keywords are the registered words that are used to perform a specific task. we can’t use any keyword for other work. c programming has 32 reserved keywords.

keywords in c programming

Basic C program with Explanation

first c program - basic of c programming
First c program

The first line #includes <stdio.h> tells the compiler to include the contents of the inbuild library header file stdio.h in the program.

A header file usually contains the inbuilt functions and macros, and to use these functions we need to include the relative library in the program.

In the next line int main(void) is a function of the type name and the int keyword tells that this function returns the int value and inside the bracket that is (void) tells about the arguments that a function takes. and always remember that the c program always starts executing from the main function in the program. so a c program must always have a main() function in it.

Next { —— } tell that from where the function starts and where the function end. { indicate the start point of function and } indicates the endpoint of function.

Next to the puts(“Hello, World”); call the puts() function to print the message on the output screen. and remember to use any function in the program we need to include the relevant header file in which the function is declared.

Next return 0; means the function returns the 0 value. remember when we start with int main(void) we see that the main function only returns the integer value so the 0 is an integer value and so it returns the 0.

Note: In c programming, every statement needs to end with; a semicolon. so we need to place; after completing every statement as you see in the program.

Other tutorials

  • The basic structure of the c program
  • History of c programming language
C Programming Tutorials, Computer Science Tutorials, Programming Tutorials Tags:c, computer science

Post navigation

Previous Post: Heap in Data Structure
Next Post: Binary Number System

Related Tutorials

Reading input in c programming Reading Input in a C program C Programming Tutorials
The First C Program C Programming Tutorials
Compiling C Programs C Programming Tutorials
History of c programming language HISTORY OF C Programming Language C Programming Tutorials
c character sets C Character Sets C Programming Tutorials
c programming interview questions and answers C Programming Interview Questions and Answers C Programming Tutorials

Leave a Reply Cancel reply

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

Pick your Subject

  • Internet of Things
  • Data Structures/Algorithms
  • Interview Preparation
  • Human Values
  • Java Interview Questions and Answers (2023)
    Thinking of becoming a Java developer? I must say it’s a good choice! Java is continuously named the most popular programming language. And the...

    Learn More “Java Interview Questions and Answers (2023)” »

  • Iot(Internet of things) in healthcare
    IoT in Healthcare
    IoMT (Internet of Medical Things) stands for devices that can collect and exchange data – either with users or other devices via the internet,...

    Learn More “IoT in Healthcare” »

  • four stages of iot solution for industry
    IoT for Industry
    In this post, we are going to learn about use cases of IoT for Industry and four stages for providing IoT solutions. Machine Diagnosis...

    Learn More “IoT for Industry” »

  • Iot for agricultural
    IoT in Agriculture
    IoT technology has realized smart wearables, connected devices, automated machines, and driverless cars. However, in agriculture, the IoT has brought the greatest impact. Amongst the challenges...

    Learn More “IoT in Agriculture” »

  • Iot for logistics
    IoT in Logistics and Supply Chain
    IoT applications for smart logistics and supply chain systems:  Logistics Fleet Tracking  To track the locations of the vehicles in real time, the vehicle...

    Learn More “IoT in Logistics and Supply Chain” »

  • Algorithms Tutorials
  • Basic Programming
  • C Programming Tutorials
  • C++ Tutorials
  • Compiler Design Tutorials
  • Computer Networks Tutorials
  • Computer Organization Tutorials
  • Computer Science Tutorials
  • Data Structures Tutorials
  • DBMS Tutorials
  • Developer Guide
  • Digital Communication
  • Digital Logic Tutorials
  • Internet of Things Tutorials
  • Internet Tutorials
  • Interview questions answers
  • Java Tutorials
  • Javascript Tutorials
  • Machine Learning Tutorials
  • Operating Systems Tutorials
  • Programming Tutorials
  • Projects
  • Tips&Tricks
  • Tools
  • VBScript Tutorials
  • Java Interview Questions and Answers (2023)
    Thinking of becoming a Java developer? I must say it’s a good choice! Java is continuously named the most popular programming language. And the...

    Learn More “Java Interview Questions and Answers (2023)” »

  • Iot(Internet of things) in healthcare
    IoT in Healthcare
    IoMT (Internet of Medical Things) stands for devices that can collect and exchange data – either with users or other devices via the internet,...

    Learn More “IoT in Healthcare” »

  • four stages of iot solution for industry
    IoT for Industry
    In this post, we are going to learn about use cases of IoT for Industry and four stages for providing IoT solutions. Machine Diagnosis...

    Learn More “IoT for Industry” »

  • Iot for agricultural
    IoT in Agriculture
    IoT technology has realized smart wearables, connected devices, automated machines, and driverless cars. However, in agriculture, the IoT has brought the greatest impact. Amongst the challenges...

    Learn More “IoT in Agriculture” »

  • Iot for logistics
    IoT in Logistics and Supply Chain
    IoT applications for smart logistics and supply chain systems:  Logistics Fleet Tracking  To track the locations of the vehicles in real time, the vehicle...

    Learn More “IoT in Logistics and Supply Chain” »

Copyright © 2023 Programmingoneonone.

Powered by PressBook Blog WordPress theme