Popular posts from this blog
M3-R4 O-Level Jan-20 MCQ With Answers
M3-R4 O-Level Jan-20 MCQ M3-R4 : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE PART-1 1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1x10 ) To read about M3-R4 O-Level Jan-20 TRUE Or FALSE Click on the following link: https://learncomputerpci.blogspot.com/2020/07/m3-r4-o-leveljan-20-true-or-false-m3.html 1.1...
Write A Program in C To Swap Two Numbers Without Using Third Variable
Write A Program in C To Swap Two Numbers Without Using Third Variable M3-R4 O-Level Jan-20 Subjective Programming Based Question M3-R4 : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE PART-1 To read about click on the following link Write A Program To Find Factorial Of Given Number Using Recursive Function https://learncomputerpci.blogspot.com/2020/07/write-program-to-find-factorial-of.html#more First Method /*Write A Program in C To Swap Two Numbers Without Using Third Variable */ #include<stdio.h> #include<conio.h> void main() { int num1,num2; clrscr(); printf("Enter first number\n"); scanf("%d",&num1); printf("Enter Second number\n"); scanf("%d",&num2); /*you can also use scanf("%d%d",&num1,&num2) to input num1 and num2 */ printf("Before Swapping num1=%d and num2=%d\n",num1,num2); /* Let num1=10 and num2=20 */ num1=num1+num2; /* Value of num1 will b...