Posts

Showing posts from September, 2020

Today thought

 Good morning to all my dear friends, Everyday takes some blessings, everyday takes some pain  The one who follow the law of gain, that one always win the game.

for adding of two element in c

  //To adding two elements a and b #include<stdio.h> int main() { int a; int b; int sum; printf("enter first number: "); scanf("%d\n", &a); printf("enter second number: "); scanf("%d\n", &b); sum = a + b; printf("the sum of two number is: %d\n", sum); return 0; }

multiplication of two elements in c

// to multiply of two numbers  #include<stdio.h> int main() {     int a;     int b;     int mult;     printf("enter the first number: ");     scanf("%d", &a);     printf("enter the second number: ");     scanf("%d", &b);     mult= a * b;     printf("the product of the two number is: %d\n", mult);      }

for ASCII value

  // for ASCII VALUE  #include<stdio.h> int main() {     char a;     printf("enter the first charctrer: ");     scanf("%c", &a);     printf("ASCII value of %c=%d",a,a);     return 0;      }

to find the size of data types

To find the size of data types  //  to find the size of each data types  #include<stdio.h> int main() {     int a;          printf ("enter the sizeof a: %d\n", sizeof(a));      }