void swap(int a,int b)
{
a=a+b;
b=a-b;
a=a-b;
}
in this code always gives the same result for all case
Answer Posted / sayantan ghosh
This will never give a result as its call by value and even the values arnt printed in the function so the values in main will only be present
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
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:
How can you draw circles in C?
When should I declare a function?
Do you know the difference between exit() and _exit() function in c?
What are the characteristics of arrays in c?
Explain that why C is procedural?
Can true be a variable name in c?
Why is this loop always executing once?
What is an endless loop?
Explain what is the advantage of a random access file?
Explain the difference between null pointer and void pointer.
what is event driven software and what is procedural driven software?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
Why is a semicolon (;) put at the end of every program statement?
which is an algorithm for sorting in a growing Lexicographic order