Skip to main content

Basic of c language

The general syntax of c language is-
#include <stdio.h>
int main()
{
   
}

Firstly we should know about the data type

There are several data type

1.int
Int is used for integer variable
2.char
Char is used for char value
3.float -
Float is used for decimal value
Basically they define what type of data .And then do operation on it.
Variables -
Variable is a word that store value.
Header file-
For example-
#include <stdio.h>
It means that what type of operation
We do and that operation is define in that header file

Terminating semicolons-

; Is mean that statement is end.
Int main( )
Is should be added in every c program.
Size of data type-
TypeStorage sizeValue range
char1 byte-128 to 127 or 0 to 255
unsigned char1 byte0 to 255
signed char1 byte-128 to 127
int2 or 4 bytes-32,768 to 32,767 or -2,147,483,648 to 2,147,483,647
unsigned int2 or 4 bytes0 to 65,535 or 0 to 4,294,967,295
short2 bytes-32,768 to 32,767
unsigned short2 bytes0 to 65,535
long4 bytes-2,147,483,648 to 2,147,483,647
unsigned long4 bytes0 to 4,294,967,295
Keywords-
Keywords is that word whose meaning is already define in c .


Keywords in C Programming

Comments

Popular posts from this blog

top 10 youtuber of india

        TOP 10 YOUTUBER OF INDIA we are live in that age where everyone is know about youtube.Most of the people open youtube minimum twice in a day. Competition on youtube is so high that people are judge other people by know that which channel he visit. In india jio telecom increase the lavel of youtube. 1.AMIT BHADANA current subscribers-13M TYPE OF CHANNEL-comedy 13 millions is not a just a small number.Amit is very popular everywhere city or village. Amit has a big no of followers. the good things about there videos is that he never use a single words of abuse. we love him. 2.BB KI VINES-BHUVAN BAM current subscribers-12M TYPE OF CANNEL-comedy now come the best youtuber of student specially engineers. in his videos he play many role that is extra ordinary.his comedy is super he has a very good sense of humour.he is very stylish. 3.GOURAV- CHANNEL NAME- TECHNICAL GURUJI               ...

solution of-BOMARBLE - D - Playing with Marbles on spoj

BOMARBLE - D - Playing with Marbles Pablo was assigned in his class to construct pentagons inside pentagons with marbles but he doesn’t know how many marbles he will need. He knows that for one pentagon he needs 5 marbles The only way he knows to insert a second pentagon is putting a marble in the middle of each segment and drawing three lines as shown. He puts a marble in the intersecting lines and removes them. To insert a third pentagon inside he first divides all segments in two including the ones that are not needed, and repeats the procedure. Drawing a second pentagon will require 12 marbles. A third pentagon will require 22 marbles. Given the information of how many pentagons will be created, write a program to calculate the number of marbles needed. solution- #include<stdio.h> int main() {int n,k; while(scanf("%d",&n)!=EOF) { if(n==0) break; else { k=5*n+((n-1)*(3*n-2))/2; printf("%d\n",k); } ...