Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / rudrapathi

It is the logic for adding the digits of given number

for example no is 1234

output is 1+2+3+4=10

Is This Answer Correct ?    27 Yes 1 No

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

Answer / 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

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

Answer / cathie

reverse of a number

Is This Answer Correct ?    3 Yes 7 No

Post New Answer

More General Aptitude Interview Questions

Ms. Neelam deposits an amount of Rs. 16420 at simple interest and obtained 25451 at the end of 5 years. What was the rate of interest per year?

0 Answers   Axis Bank,


On Monday a banker processed a batch of cheques, on Tuesday she processed three times as many, and on Wednesday she processed 4000 cheques. In the three days, she processed 16000 cheques. How many did she process on Tuesday?

4 Answers   TCS,


The LCM of two numbers is 60. The sum of the numbers is 50. What are the numbers?

10 Answers   Alps, IBM,


Find the hypotaneous of a right angle isoceles tringle whose area is 50.

4 Answers   COSL,


Information on Pratibha Patil and Abrahim Hincoln?

0 Answers  


Find the next series number 1, 1, 2, 3, 6, 7, 10, 11, ?

0 Answers   HCL, Infosys,


Work can be done by 8 men and 10 women in 25 days, the same work can be done by 10 children and 5 women . in how many days 2 children and 3 men can do the work?

0 Answers   Accenture,


A certain number of men can finish a piece of work in 10 days. If however there were 10 men less it will take 10 days more for the work to be finished. How many men were there originally?

3 Answers   KPIT,


A son and father go for boating in river upstream. After rowing for 1 mile son notices the hat of his father falling in the river. After 5 min. he tells his father that his hat has fallen. So they turn around and are able to pick the hat at the point from where they began boating after 5 min. tell the speed of river.

0 Answers   Cognizant,


If macros are disabled in a workbook, what do we do to enable them?

2 Answers   eClerx,


Sum of 1 to 40 is?

2 Answers   3D PLM,


20% of a 6 litre solution and 60% of 4 litre solution are mixed. What percentage of the mixture of solution ?

0 Answers   3i Infotech, Canara Bank, Geodesic, Mu Sigma,


Categories