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

how to store 50 no of books in 9 racks.. condition 1.only store odd nos of books in every rack. 2. no rack will be empty&don`t store even no of books in a rack.

6 Answers  


If 32+24=100 what no. system is used?

4 Answers   3D PLM,


There are two trees in a lawn. One grows at a rate 3/5 of the other in 4 years. If the total growth of trees is 8 ft. What is the height of the smaller tree after 2 years? how can i get this answer...

6 Answers   TCS,


The speed ratio of two trains is 5:7,first train is travelling at a speed of 350 km/hr, what is the speed of the second train?

3 Answers  


Find the value of the 678 to the base 7.

0 Answers   Accenture, BSNL,


How many 3 digits with 3 Distinct digits are there from 100-1000.

0 Answers   Accenture,


Which countries have two official national anthem ?

0 Answers  


Pls send me which book to follow for SBI-clerical exam 2008

0 Answers  


A man ate 100 bananas in five days, each day eating 6 more than the previous day. How many bananas did he eat on the first day?

0 Answers   iNautix, Wipro,


A,H,S,I,?,H,D

4 Answers   Accenture, ICICI,


Hello!!I have appllied for the post of Jr.Executive(ATC).My educational qualification is B.Tech(IT).I ould like to know if the questions in technical section will be based on IT alone or else also from other subjects also like electrical/electronics/civil/tele communication.I will be grateful for a relevant answer.thank you in advance

0 Answers  


Complete the series. 3, 8, --, 24, --, 48, 63

1 Answers   Accenture, BSNL,


Categories