Explain the logic
k=num%10;
sum=sum+k;
num=num/10;

Answer Posted / bariki shanmukha[anantapuram,m

I wil take 3 variables such as,sum=0,k,num[IT REPRESENTS
GIVEN NUMBER BY THE USER].

itr1 itr2 itr3 itr4 itr5

k : - 4 3 2 1

sum: 0 4 7 9 10

num: 1234 123 12 1 0

like that exucution wil b starts which is above mentioned.

Is This Answer Correct ?    11 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

1,40,00,000 pencils are put up straight. all the pencils are of length range 3 to 6 inches. 80% of the pencils have average of five inches. so the find out the total length spanned by the pencils.

836


M, N, O are jogging in the same direction around a circular track. The track is marked with numbers from 1 to 12, like the dial of a watch. The 12 numbers are uniformly spaced on the track. M overtakes N once at 5 and then the next time again at 9. M overtakes O once at 2 and then the next time again at 4. Find the ratio of N's speed to O's speed?

736


How many mashes are there in 1 square meter of wire gauge if each mesh is 8mm long and 5mm wide ?

827


what can you contribute to the fiscal commission?

1557


A theif steals half the total no of loaves of bread plus 1/2 loaf from a backery. A second theif steals half the remaing no of loaves plus 1/2 loaf and so on. After the 5th theif has stolen there are no more loaves left in the backery. What was the total no of loaves did the backery have at the biggining.

1088






Successive discounts of 10%, 20% and 20% are equal to a single discount of __

691


In a queue, a man is standing at the position 10th from the front and 15th from behind. How many persons are standing in the queue?

841


Rajdhani Express starts from Delhi at 12:00 pm and reaches Chandigarh at 2:30 pm and Doronto Express starts from Chandigarh at 12:15 and reach at Delhi at 2:15 . What will be the time when both the trains will cross each other?

718


2. Why would you choose a database system instead of simply storing data in operating system files? Give and explain advantages of using DBMS.

1026


A & B are playing a game .There are 8 oranges in a row on the table.one Player can take 1-4 oranges in a pick (a maximum of 4),one who picks the last orange wins the game.'A' plays first How many oranges should he pick first time inorder to win the game.

717


Imagine 4 persons A,B,C,D.(It is a strength determining game). A found it hard,but could pull 'c' and 'd' to his side. AC and BD pairs on opposite sides found themselves equally balanced. When A and B exchanged their positions to form pairs AD and BC ,BC pair could win and pull AD to their side.Order the 4 persons in Ascending order according to their strengths.

694


A beats B by 10 meters and B beats C by 15 meters the A beats C by

712


a vendor solds two things at same cost 12 RS with one item at 25%profit and other at 20%loss,by this transaction he made profit or loss by how much

912


A coffee shop blends 2 kinds of coffee,putting in 2 parts of a 33p. a gm. grade to 1 part of a 24p. a gm.If the mixture is changed to 1 part of the 33p. a gm. to 2 parts of the less expensive grade,how much will the shop save in blending 100 gms.

985


what is the exact qualifing marks for group 1 prelims

1838