C Program to
Demonstrate Nested Printf Statement
#include
#include
void main()
{
clrscr();
printf("%d",printf("abcdefghijklmnopqrstuvwxyz"));
getch();
}
Output
abcdefghijklmnopqrstuvwxyz
C Program to Swap two no’s without using third variable
#include
#include
int main()
{
int a,b;
printf("\n Entervalue for num1 & num2:");
scanf("%d%d",&a,&b)
a=a+b;
b=a-b;
a=a-b;
printf("\n After swapping value of a :%d",a);
printf("\n After swapping value of b :%d",b);
return(0);
}
Output
Enter value for
num1&num2: 10 20
After swapping value of a
:20
After swapping value of b
:10
No comments:
Post a Comment