answersLogoWhite

0

#include<stdio.h>

main()

{

int a,b;

printf("enter the value for a and b\n");

scanf("%d %d",&a,&b);

display(a,b);

}

display(int x,int y)

{

int temp;

temp=x;

x=y;

y=temp;

printf("%d %d",x,y);

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


Write a program large number and small number among n numbers by using If statement?

12


When you write a program that stores a value in a variable you are using storage?

Yes, when you write a program that stores a value in a variable, you are utilizing storage to hold that value in memory. The variable acts as a named reference to the data, allowing the program to access and manipulate it as needed. This storage can be temporary (like in RAM) during program execution, or it can be persistent if saved to a more permanent medium, such as a file or database. Overall, managing storage is essential for effective data handling in programming.


What is program in c to swap entered two numbers without using third variable?

The required c program is given below /*Swapping(interchange) the two entered numbers*/ #include&lt;stdio.h&gt; main() { /*Without using third variable*/ int a,b,t; printf("Enter a:"); scanf("%d",&amp;a); printf("Enter b:"); scanf("%d",&amp;b); a=a+b; b=a-b; a=a-b; printf("\n After swapping without using third variable"); printf("\na=%d\nb=%d",a,b); }


Write a C program to find lowest number among ten numbers using for loop?

If you had an array int numbers[10]; you would do it like this: CODE: int lowestnumber = numbers[0]; for(int i = 0; i &lt; 10; i++){ if(numbers[i] &lt; lowestnumber) lowestnumber = numbers[i]; } END CODE I think this should work, and in the end the variable lowestnumber will hold the lowest value in the ten. Hope this helps.

Related Questions

How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


What is the definition for defining the variable?

choosing a variable to represent one of the unspecified numbers in a problem and using it to write expressions for the other unspecified numbers in the problem.


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


Write a shell program using if-the-else to test whether a variable name is a directory or a file?

see : Write_a_shell_program_using_the_if-the-else_to_test_whether_a_variable_name_is_a_directory_or_a_file


Write a program to find the product of two numbers using Halving and Doubling method?

i need this answer


Can you write addition of 2 no program without using third variable?

Yes. int a, b; a= 2; b= 3; a= a+b;


Write a program large number and small number among n numbers by using If statement?

12


What is program in c to swap entered two numbers without using third variable?

The required c program is given below /*Swapping(interchange) the two entered numbers*/ #include&lt;stdio.h&gt; main() { /*Without using third variable*/ int a,b,t; printf("Enter a:"); scanf("%d",&amp;a); printf("Enter b:"); scanf("%d",&amp;b); a=a+b; b=a-b; a=a-b; printf("\n After swapping without using third variable"); printf("\na=%d\nb=%d",a,b); }


Write a C program to find lowest number among ten numbers using for loop?

If you had an array int numbers[10]; you would do it like this: CODE: int lowestnumber = numbers[0]; for(int i = 0; i &lt; 10; i++){ if(numbers[i] &lt; lowestnumber) lowestnumber = numbers[i]; } END CODE I think this should work, and in the end the variable lowestnumber will hold the lowest value in the ten. Hope this helps.


Write a program to swap two numbers using function?

swap (int *a, int *b) { *a ^= *b; *b ^= *a; *a ^= *b; }


Write a C program to find the square of two numbers?

Please visit http://talentsealed.blogspot.com/2009/10/to-find-sqaure-of-numbers-using-c.htmlfor the answer.