UrbanPro

Learn C Language from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Write a C program to swap two numbers without using 3rd variable?

Asked by Last Modified  

Follow 4
Answer

Please enter your answer

int a=10,b=20; a = a+b ; b = a - b ; a = a - b ; this is the way you can swap two numbers..... call 7 9 9 0 5 4 5 9 8 1 for more queries..... Mr. Paresh Patel. (B.Sc(MATHS), MCA, MBA(IT & Marketing).
Comments

Tutor

Concatenate into a comma delimited string Reverse it Split the string to get the revised array
Comments

Home Tutor-Practical Learning

Logic A=A+B; B=A-B; A=A-B;
Comments

View 1 more Answers

Related Questions

What is a calling function in C?
A calling function is a way to execute a block of code that's defined elsewhere in your program. It's like asking a specialized worker to perform a specific task within your main project. It promotes code organization, reusability, and modularity.
Deepika
0 0
6
Why is the C language important?
C language is a high-level, general-purpose programming language. It provides a straightforward, consistent, powerful interface for programming systems. That's why the C language is widely used for developing...
Ganesh
0 0
5
Other than in a for statement, when is the comma operator used?
Example : int i,j; i=(10,20,30,40); j=10,20,30,40; printf("%d",i); printf("%d",j); // in this program output of i will be 40 and j will be 10 // In interviews you can face such type of comma operator related questions.
Sanjay
How and where do I start learning C programming?
C language is the basic of the programming to learn the basic of programming we learn the c language
Gaurav
0 0
7
What is the meaning of \n and \t in C language?
is new line and \t is for tab
Priya
0 0
5

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Some Tricky Questions in C
Can you write two functions in which one executes before main function and other executes after the main function? #pragma startup #pragma exit Where, priority is optional integer value.For user priority...

Be prepared to get trained--init
Before starting the training,students must be mentally prepared for acceptance of new knowledge. Students must attend training with open minded forgetting the position they are working.This will help...
S

Smartnub Softsolutions

0 0
0

Storage classes in c
Storage classes determine the scope and life time of a variable. Scope is defined as the region over which the defined variable is accessible. Lifetime is the time during which the value of a variable...

Is It Fine To Write “void main()” Or “main()” In C/C++?
The definition: void main() { /* ... */ } Is not and never has been C++, nor has it even been C. See the ISO C++ standard 3.6.1 or the ISO C standard 5.1.2.2.1. A conforming...

Working with C/C++ applications
Inorder to learn C and C++ programming languages one can work with various editors available.To name a few are the most popular one is turbo c++, DEV C++, Eclipse, NetBeans. Here are the screen shots...

Recommended Articles

Brilliant Academy is one of the reputed institutes for B.Tech tuition classes. This institute is specialised in delivering quality tuition classes for B.E, Engineering - all streams and Engineering diploma courses. Incorporated in 2012, Brillant Academy is a brainchild of Mr Jagadeesh. The main motto of the academy is to...

Read full article >

Lasya Infotech is a Hyderabad based IT training institute founded in 2016 by O Venkat. Believing in his innovation, passion and persistence and with a diverse blend of experience, he started his brainchild to deliver exemplary professional courses to aspiring candidates by honing their skills. Ever since the institute envisions...

Read full article >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Software Development has been one of the most popular career trends since years. The reason behind this is the fact that software are being used almost everywhere today.  In all of our lives, from the morning’s alarm clock to the coffee maker, car, mobile phone, computer, ATM and in almost everything we use in our daily...

Read full article >

Looking for C Language Classes?

Find best C Language Classes in your locality on UrbanPro.

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for C Language Classes?

Find best tutors for C Language Classes by posting a requirement.

  • Post a learning requirement
  • Get customized responses
  • Compare and select the best

Looking for C Language Classes?

Get started now, by booking a Free Demo Class

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All