Now I discuss some sample cum simple programs of C language. Q)Write a program to print "hello world"? P: #include<s...
Now I discuss some sample cum simple programs of C language.
Q)Write a program to print "hello world"?
P: #include<stdio.h> // optional in c
void main()
{
printf("Hell World"); // print
}
Q)Write a basic program to input 2 no.s and print its sum(using third variable).
P: #include<stdio.h>
void main()
{
int a,b,c;
printf("enter value of a and b");
scanf("%d%d",&a,&b);
c=a+b;
printf("sum=%d",c);
}
Or
COMMENTS