Write a program to exchange two variaables without temp
Answer Posted / srinivas
main()
{
int a=3,b=2;
a = (a+b)-(b=a);
printf("a=%d,b=%d",a,b);
}
o/p:- a=2,b=3
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the auto keyword good for?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
How can a program be made to print the line number where an error occurs?
What does 1f stand for?
Write a program to maintain student’s record. Record should
not be available to any unauthorized user. There are three
(3) categories of users. Each user has its own type. It
depends upon user’s type that which kind of operations user
can perform. Their types and options are mentioned below:
1. Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record)
2. Super Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record, Delete Single Record)
3. Guest
(Search Record [by Reg. No or Name], View All Records)
When first time program runs, it asks to create accounts.
Each user type has only 1 account (which means that there
can be maximum 3 accounts). In account creation, following
options are required:
Login Name: <6-10 alphabets long, should be unique>
Password: <6-10 alphabets long, should not display
characters when user type>
Confirm Password:
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
Why C language is a procedural language?
What is the use of putchar function?
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
How can I read/write structures from/to data files?
Whats s or c mean?
What is an auto variable in c?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
Is exit(status) truly equivalent to returning the same status from main?
What's the best way of making my program efficient?