C language tricky good pointers questions and explanation operators data types arrays structures questions functions recursion preprocessors, looping, file handling, strings questions switch case if else printf advance c linux objective types mcq faq interview questions and answers with explanation and solution for freshers or beginners. Placement online written test prime numbers Armstrong Fibonacci series factorial palindrome code programs examples on c c++ tutorials and pdf
lets work out this with example now suppose for n=1 1<1 does not satisfy for n=2 1<2 satisfies 2%1==0 satisfies sum=0+1=1 i++(so i is 2 now) 2<2 does not satisfy for n=3 while 2<3 satisfies 3%2==0 does not satisfy for n=4 while 2<4 satisfies 2%4==0 satisfies sum=1+2=3 i=3(i++ i.e i=2+1=3) for n=5 while 3<5 satisfies 5%3==0 does not satisfy for n=6 while 3<6 satisfies 6%3==0 satisfies sum=3+3=6 So here Sum==n satisfies so 6 is a perfect number... Rocked it everyone can easily understand now
18 comments:
thank u for ur program.
This site is really good I visit this site eneryday.Good questions.The best part is it provides explanation to every question.Best site.
Thanks alot
this site is undoubtedly a super duper excellent site to let anyone quench his thirst for c programming logics and concepts! hats offff!
IT IS BETTER TO PUT OUTPUT OF PARTICULAR PROGRAM....
this is a great site had much information for beginners to experienced .....
super,best site for all new learners
lets work out this with example now suppose
for n=1
1<1 does not satisfy
for n=2
1<2 satisfies
2%1==0 satisfies
sum=0+1=1
i++(so i is 2 now)
2<2 does not satisfy
for n=3
while 2<3 satisfies
3%2==0 does not satisfy
for n=4
while 2<4 satisfies
2%4==0 satisfies
sum=1+2=3
i=3(i++ i.e i=2+1=3)
for n=5
while 3<5 satisfies
5%3==0 does not satisfy
for n=6
while 3<6 satisfies
6%3==0 satisfies
sum=3+3=6
So here Sum==n satisfies so 6 is a perfect number...
Rocked it everyone can easily understand now
It would be better to initialize Sum with 1 and i with 2.
Thankx. . .for more description on Prefect No. . .just wiki on: http://en.wikipedia.org/wiki/Perfect_number
brilliant
thanks
luv dis site...\m/\m/\m/
nice blog for studentsthx agian
give the answer for question --------------10. Write a c program to add two numbers without using addition operator.???
Thank you very much. This tutorial have helped me complete my university Assignments and Lab reports in time.
Thank u.....
Best site for a computer engineering student like me. Thanks a lot.....
Parveen Arora
really i am very much thankful to u...its very much helpful to me..thanks a lot.
Post a Comment