Monday 8 December 2014

C program to check properties of printf function

program to check properties of printf function
#include<stdio.h>
main()
{
int a,b,c;
printf("eneter values for a and b\n");
printf("a and b values are",scanf("%d %d",&a,&b));
printf("\n");
c=a+b;
printf("c=%d",c);
printf("\n");
}
OutPut:
madan@madan-Lenovo-G570:~/madan$ cc ex51.c
madan@madan-Lenovo-G570:~/madan$ ./a.out
eneter values for a and b
10
20
a and b values are
c=30