how to swap all the values without using temporary variable.
tha values r a = 20, x=60 and p=2.
Answers were Sorted based on User's Feedback
Answer / padmas
To swap the values without using temporary variable
for a,x and p,
Do a call to swap function for a and p and
another call to same swap function for x and p.
call1:swap(a,p);
call2:swap(x,p);
swap(variable1,variable2)
{no temporary variable}
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / padmas
If the values for a=20,x=60, and p=2 then
need another set of values for b=,y= and q= to do the swap
without using temporary variable.
| Is This Answer Correct ? | 1 Yes | 2 No |
What is the output of the following x = "abcdef" i = "a" for i in x: print(i), a) no output b) i i i i i i … c) a a a a a a … d) a b c d e f
hii I inntrested abt scjp certification but i dont knw abt scjp plz send details abt scjp exam and syllabus.
Explain the difference between an expert and a novice user. How would your strategy for designing user interfaces for an expert user differ from that for designing user interfaces for a novice user.
suppose we have ten members of a physical file but we want the output of last 5 members only.how to achieve that?
how to convert infix expression to prefix expression?
Suppose we are doing 4 operations on database using service, first operation is successful but due to some reason remaining 3 operations are failed. I) is this transaction successful or not? ii) How can you give that error message to user?
A good website has the following conditions It should be interactive. It should contain at least 20 images. Title cannot be null and should contain at least 10 letters other than spaces and hyphen (-). The keywords should contain atleast three among the following list : "design", "Graphics", "lovely", "beautiful", "amazing" and "mesmerising" Write a method: boolean isGoodWebsite(boolean isInteractive, int numOfImages, String title,String keywords[]) isInteractive whether the site is interactive or not numOfImages Number of images on the website title Title of the website keywords Array of keywords in the website.
What is the difference between CriteriaQuery and CreateQuery in Hibernate???? Thanks in advance!!!!!!
What do you understand by modular programming?
what is the difference between SCAN AND CHECK,LOKUP AND XFOOT? where we can use thease opcodes? Can any body tell me real time senariao with example?
How many forms can you create in a Visual Basic 6 Standard EXE project? Is there any limit on that?
What do you mean by an array ? explain with an example