Posts

Showing posts from May, 2023

Finding Area of a Square using C language

 #include<stdio.h> int main() {     float side;     printf("Please Enter the side square : ");     scanf("%f", &side);     printf("Area of the square is : %f", side*side);     return 0; }     My YouTube Channel :: Viral Bhoi - YouTube Thanks for visiting my Blog. Hopefully it helped you. Please check out more blogs for practice. We will meet soon. bye. Jay Hind...

Doing divide Using C language.

 #include<stdio.h> int main() {     int x ,y ;     printf("Enetr x: ");     scanf("%d", &x);     printf("Enetr y: ");     scanf("%d", &y);     printf("div. of x and y is :  %d",x/y);     return 0; }     My YouTube Channel :: Viral Bhoi - YouTube Thanks for visiting my Blog. Hopefully it helped you. Please check out more blogs for practice. We will meet soon. bye. Jay Hind...

Doing subtraction using C language.

 #include<stdio.h> int main() {     int x ,y ;     printf("Enetr x: ");     scanf("%d", &x);     printf("Enetr y: ");     scanf("%d", &y);     printf("diff. of x and y is :  %d",x-y);     return 0; }     My YouTube Channel :: Viral Bhoi - YouTube Thanks for visiting my Blog. Hopefully it helped you. Please check out more blogs for practice. We will meet soon. bye. Jay Hind...

Doing product using C language.

 #include<stdio.h> int main() {     int x ,y ;     printf("Enetr x: ");     scanf("%d", &x);     printf("Enetr y: ");     scanf("%d", &y);     printf("product of x and y is :  %d",x*y);     return 0; }     My YouTube Channel :: Viral Bhoi - YouTube Thanks for visiting my Blog. Hopefully it helped you. Please check out more blogs for practice. We will meet soon. bye. Jay Hind...

Doing Sum using C language.

 #include<stdio.h> int main() {     int x ,y ;     printf("Enetr x: ");     scanf("%d", &x);     printf("Enetr y: ");     scanf("%d", &y);     printf("sum of x and y is :  %d",x+y);     return 0; }     My YouTube Channel :: Viral Bhoi - YouTube Thanks for visiting my Blog. Hopefully it helped you. Please check out more blogs for practice. We will meet soon. bye. Jay Hind...

Taking Input Using C language.

 #include<stdio.h> int main() {     int num; printf("Please enter a number :");         scanf("%d", &num);         printf("Number is : %d", num); return 0; } My YouTube Channel :: Viral Bhoi - YouTube Thanks for visiting my Blog. Hopefully it helped you. Please check out more blogs for practice. We will meet soon. bye. Jay Hind...

Printing char using C language.

 #include<stdio.h> int main() {     char hash = '#'; printf("charecter is %c\n", hash); return 0; } My YouTube Channel :: Viral Bhoi - YouTube Thanks for visiting my Blog. Hopefully it helped you. Please check out more blogs for practice. We will meet soon. bye. Jay Hind...

Printing float pi using C language.

Image
Printing the value of pi as a float variable in the C language is an important skill for any programmer. In this blog post, we will explore the different ways to print the value of pi as a float variable in C, including the use of the  printf   function and format specifiers. Whether you are a beginner or an experienced programmer, this post will provide valuable insights and tips on how to effectively print the value of pi as a float variable in your C programs .  #include<stdio.h> int main() {     float pi = 3.14; printf("Number is %f\n", pi); return 0; } This is a simple C program that prints the value of a float variable to the standard output. Here is an explanation of each line of the code: #include<stdio.h> : This line includes the  stdio.h  header file, which contains the declarations for the  printf  function used in the program. int main() { : This line defines the  main  function, ...

Printing Number (Integer) Variable in C Language

Image
Printing integer variables in the C language is a fundamental concept that every programmer should know. In this blog post, we will explore the different ways to print integer variables in C , including the use of the  printf  function and format specifiers. Whether you are a beginner or an experienced programmer, this post will provide valuable insights and tips on how to effectively print integer variables in your C programs.   #include<stdio.h> int main() {     int num = 25; printf("Number is %d\n", num); return 0; } This is a simple C program that prints the value of an integer variable to the standard output. Here is an explanation of each line of the code: #include<stdio.h> : This line includes the  stdio.h  header file, which contains the declarations for the  printf  function used in the program. int main() { : This line defines the  main  function, which is the entry point of the pr...

First program of C language (Hello World)

Image
C is a powerful and widely used programming language that can run on various platforms. It is also the basis of many other languages such as C++, Java, and Python . In this blog, I will show you how to write a simple C program that prints “Hello, world!” on the screen, and explain the basic concepts and syntax of C. This blog is suitable for beginners who want to learn C programming from scratch, as well as for experienced programmers who want to refresh their skills. By the end of this blog, you will be able to write your own C programs and understand how they work. If you are interested in learning C programming, please read on and follow the steps. I hope you enjoy this blog and find it useful. 😊 code :    #include<stdio.h> int main() { printf("hello world\n"); return 0; } This is a simple C program that prints the string “hello world” followed by a newline character to the standard output. Here is an explanation of each line of the code: #include<s...