Sunday, 10 December 2017

Learn C language Part 3 swapping the values of two variables







#include <stdio.h>

#include <conio.h>





main()

{



int x,y,z;



printf("Enter the value of x: ");

scanf("%d",&x); //5



printf("Enter the value of y: ");

scanf("%d",&y);//10



z=x; //z=5

x=y; //x=10

y=z; //y=5







printf("\n\n\n\nx=%d",x);

printf("\ny=%d",y);









}

No comments:

Post a Comment

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...