Shilpa HJan 22, 20211 min readC Program to describe output for real numbers#include<stdio.h> void main() { float a=98.7654; printf("%f\n",a); printf("%7.4f\n",a); printf("%-7.2f\n",a); printf("-%7.2f\n",a);...
Shilpa HJan 22, 20211 min readc Program to describe width and precession#include<stdio.h> void main() { float a=157.8926; printf("%f\n",a); printf("%2.2f\n",a); printf("%7.3f\n",a); printf("%7.4f\n",a);...
Shilpa HJan 22, 20211 min readC program to swap two numbers using temporary variable#include <stdio.h> void main() { int a,b,temp; printf("Enter the values of a and b\n"); scanf("%d%d",&a,&b); temp=a; a=b; b=temp;...
Shilpa HJan 22, 20211 min readC program to swap two numbers without using temporary variable#include <stdio.h> void main() { int a,b,temp; printf("Enter the values of a and b\n"); scanf("%d%d",&a,&b); a=a-b; b=a+b; a=b-a;...
Shilpa HJan 22, 20211 min readC program to find area and circumference of a circle#include <stdio.h> int main() { int circle_radius; float PI_VALUE=3.14, circle_area, circle_circumf; //Ask user to enter the radius of...
Shilpa HJan 22, 20211 min readC program to find sum of 2 numbers /*C program to find sum of two numbers*/ #include <stdio.h> int main(void) { /* Declare and initialize variables. */ double number1 =...