#include<stdio.h> //10.function void myData(){ printf("RajoMay Data Loading..."); } int myDataa(int a){ return a*100; } int main(){ //1.print on console printf("Rajomay"); //_____________________________________________________________________________________________________________ //2.Taking input int a; scanf("%d",&a); printf("your entered no. : %d",a); //_____________________________________________________________________________________________________________ //3.Data Type & format specifier c does not support string short a1;//2bytes %hd 5digit int a2; //4bytes %d 10digit long a3; //8bytes %ld long long int a4; //8bytes %lld float b1;//4bytes %f double b2;//8bytes %lf char a = 'a'; //%c char b[] = "rajomay"; //%s bool a = true //%b //_____________________________________________________________________________________________________________ //4.multiline input scanf("%d %f %c %s",&a2,&b1,&a,&b); printf("%d %.2f %c %s",a2,b1,a,b); //_____________________________________________________________________________________________________________ //5.multiline string input scanf("%[^\n]s", b); //_____________________________________________________________________________________________________________ //6.if/else if(true){ printf("yes"); } else if(false){ printf("no"); } else{ printf("NA"); } //_____________________________________________________________________________________________________________ //7.switch case (Note-: cannot pass string case " ") switch(true){ case 1: printf("num"); break; case 'a': printf("char"); break; default: printf("NA") } //_____________________________________________________________________________________________________________ //8.for loops for(int i=1;i<=10;i++){ printf("%d \n",i) } //_____________________________________________________________________________________________________________ //9.while and do-while loop int i=44; while(i<10){ printf("%d \n",i) i++; } //--------------------------------------- do{ printf("%d \n",i); i++; }while(i<10); //_____________________________________________________________________________________________________________ //10.function myData(); printf("%d",myData(2)); //_____________________________________________________________________________________________________________ //11.Typecasting int i = 17; double d; char c; char ac[10]; d = (double) i; c = (char) i; sprintf(ac,"%d",i); printf("Value : %lf %c %s ", d , c , ac ); //_____________________________________________________________________________________________________________ return 0; }