0% found this document useful (0 votes)
5 views5 pages

4program Formula

The document contains multiple C programs demonstrating basic functionalities. It includes programs to print 'Hello World', display a fixed age, prompt for user input to display age, and perform arithmetic operations. Each program is accompanied by its output format.

Uploaded by

ravisiwach366
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

4program Formula

The document contains multiple C programs demonstrating basic functionalities. It includes programs to print 'Hello World', display a fixed age, prompt for user input to display age, and perform arithmetic operations. Each program is accompanied by its output format.

Uploaded by

ravisiwach366
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

C Programs

Write a Program to Print “Hello world “


#include <stdio.h>

int main()

printf("Hello World");

return 0;

Output :-
Write a Program to print age:-

#include <stdio.h>

int main()

int age = 59;

printf("Age is %d", age);

return 0;

Output :-
Write a Program to print Age :-

#include <stdio.h>

int main()

int age;

printf("Enter the age: ");

scanf("%d", &age);

printf("Age is %d", age);

return 0;

Output
Write a Program to print Arithmetic operators :-

#include <stdio.h>

int main()
{
int a = 32;
int b = 84;

printf("Addition: %d\n", a + b);


printf("Subtraction: %d\n", a - b);
printf("Multiplication: %d\n", a * b);
printf("Division: %d\n", a / b);
return 0;
}
Output:-

You might also like