Introduction to C Programming LAB Assignment 1
Introduction to C Programming LAB Assignment 1
Q1.Write a program to print “Hello” in C language #include <stdio.h> int main() { printf("Hello"); return 0; } ``` Q2.Write a program to add 2 constant numbers in C language ``` #include <stdio.h> int main() { int num1 = 5; int num2 = 7; int sum = num1 + num2; printf("The sum of %d and %d is: %d", num1, num2, sum); return 0; } ``` Q.3Write a program to perform all the arithmetic operations in c languages : #include <stdio.h> int main() { int a = 10, b = 5; int add = a + b; int sub = a - b; int mul = a * b; int div = a / b; int rem = a % b; printf("Sum of a and b is: %d\n", add); printf("Difference between a and b is: %d\n", sub); printf("Product of a and b is: %d\n", mul); printf("Quotient when a is divided by b is: %d\n", div); printf("Remainder when a is divided by b is: %d\n", rem); return 0; } ``` Q4. Write a program to find area of circle in c language #include…