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               ...

Conditional statement in c language

Conditional statement This is very simple.you face these problem daily.if you want to go to market and go to park . But at a time you can go only one place either market or park. In programming you also face these problems. These are given below 1 .if 2.if-else 3.if-else-if 4.nested if If statement- statement is execute when condition is true other wise it will terminated from loop. #include<stdio.h> int main( ) { if(condition)           {              statement;           } } FLOW CHART OF IF STATEMENT- 2.if-else statement- general syntax of if-else statement- #include<stdio.h> int main( ) { if(condition) { statement1; } else { statement 2; } EXPLAINATION- if condition true than  statement 1 execute otherwise it will be terminated. flow chart of if-else- 3.if-else-if General  syntax of if else if #include...

solution of -CIRCLE_E - Three Circle Problem (EASY) on spoj

solution- Given 3 distinct circles with positive integer radius  R1 ,  R2 , and  R3 , and arranged like in the picture below: Now, your task is to compute radius of small circle that can be created like yellow circle in the picture above. All circles in the picture above tangent each other. Input- The first line in the input data, there is an integer  T (0 <  T  ≤ 10 3 ) denoting number of test cases, than  T  lines follow. For each lines, there are three integer   R1 ,  R2 , and  R3 , (0 < { R1 , R2 , R3 } < 10 9 ) denoting radius of each circle like in the picture above. ATTENTION- take input in float- SYNTAX- #include<stdio.h> #include<math.h> #include<stdlib.h> int main() {double a,b,c,t; double r; scanf("%lf",&t); while(t--) { scanf("%lf%lf%lf",&a,&b,&c); if(a>0&&b>0&&c>0) { r=a*b*c/(2*sqrt(a*b*c*(a+b+...