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

send some genaral aptitude questions to my email id- siva.maradana@yahoo.com

0 Answers  


If 9x-3y=12 and 3x-5y=7 then 6x-2y = ?

1 Answers   Cisco, Mu Sigma,


This is on letter series like if DEFGHI: ABCDEF then NOPQRS:_______

11 Answers   EA Electronic Arts, TS,


A machine puts c caps on bottles in m minutes. How many hours will it take to put caps on b bottles?

3 Answers  


Plese give pattern on NIC Exam

0 Answers   ABC,


APPSC Group-2 Previous Exam Papers

0 Answers  


Find sqrt of 113 up to 3 decimal places.

0 Answers   Bently,


You are driving along in your car on a wild, stormy night, it's raining heavily, when suddenly you pass by a bus stop, and you see three people waiting for a bus: An old lady who looks as if she is about to die. An old friend who once saved your life. The perfect partner you have been dreaming about. Which one would you choose to offer a ride to, knowing very well that there could only be one passenger in your car? This is a moral/ethical dilemma that was once actually used as part of a job application. * You could pick up the old lady, because she is going to die, and thus you should save her first; * or you could take the old friend because he once saved your life, and this would be the perfect chance to ! pay him back. * However, you may never be able to find your perfect mate again.

15 Answers   Syntensia, TCS,


for cube and sphere 3 views are similarly draw one such figure?

2 Answers   Geometric Software,


From 7:00 AM to 11:00 AM it rained 2.25 inches. At 11:00 AM the rain increased to fall at a rate of 1.25 in. every two hours. How many inches of rain landed on the ground by 5:00 PM?

9 Answers   Accenture, Patni, TCS,


An apple seller is having some apples. He is selling half of the apple what he has plus half the apple to the first customer. In the same way he sells the remaining apple to 7 customers. After selling to 7 customers, he has no apples with him.

0 Answers   Accenture,


Total distance is 120 km . Going by 60kmph and coming back by 40kmph what is the average speed?

8 Answers   Accenture, CMC,


Categories