Hi, this website provides study material for a diploma student. Here you could find material on all subjects and fields.

Now the only subject left was Icp(introduction to c programming) whose material will also be available here.
It Will help move forward in the field of development



These images are used to develop students interest and get understand which content is in this post

Join Telegram Group



C Programming Basic Structure



#include <stdio.h>//header file
#include <conio.h>
int main()

{

    /*writing some code */
    
}


comment line

there are two types of comment lines in c programming

  1. single-line comment
  2. // it's called the single-line comment
  3. multiple line comment
  4. /* your comment will be writing here*/
    this code is used for given comment to understand another person to help this code it's called multiple line comment
Header file

The header file is important for all of your code. because without your header file computer does not understand your language.

when you write code for multiple purposes in c language like addition, subtraction, multiplication, etc.... then add "math. h" header file for example, we add two values like 6 + 4,

we know that computers know the only binary language then firest its convert in binary language and see the meaning of your line in a header file and get output

speak in the simple way header file is work as a dictionary, to help your language convert in binary and get the output of your code

int main() function

int main is the main function where the program starts it's mean to execute your program.

writing some code

what you want to output in your program. according to output write code in (Curly Brackets) {}.for example, we print hello world in your output

#include <stdio.h>//header file
#include <conio.h>

int main()

{
    /*writing code */
printf("GTU MCQ Materials");
    
}



printf
here is the meaning of printf("")
printf work like keyboard what you input in Quotation Mark we input GTU MCQ Materials. so the program gives output GTU MCQ Materials.
if you print your name then you will write your name in Quotation Mark like we print ram.

printf("ram")

#include <stdio.h> //library our
#include <conio.h>

int main()

{
    int a=10;
    float b=60.25;
char name;

}



Variable

the variable is like a memory card it's used to stored values.

Variable name = stored value ;

the rule for define variables in c

`Rightarrow`can contain alphabets, digits, and underscore
`Rightarrow` a var name can start analphabets and underscore only
`Rightarrow`cacan't start with a digit
`Rightarrow`not whitespace and reserved keywords is allow

Data Type

structure of data type

int a = 10;
int is a data type,
a is variable,
10 is a number, provide a value of a

there are four types of data types

  1. Basic
    • int
    • char
    • float
    • double
  2. Derived
    • array
    • pointer
    • structure
    • union
  3. Enumeration
    • enum
  4. Void
    • void

A character variable for name, an integer variable for non-decimal numbers, a float variable for decimal numbers.

You successfully read this post. part-2 is coming soon. it's basic but your try to know something new. this habit is observed in successful people.
all education content and project available comment here

C Programming

How To Learn C Programming? | Structure, Examples and C Programming Basic Introduction Part 1

  

 GTU Book Material For Free