Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
No Answer is Posted For this Question
Be the First to Post Answer
difference between ordinary variable and pointer in C?
How can I prevent another program from modifying part of a file that I am modifying?
What is the purpose of 'register' keyword in c language?
How can I set an array's size at run time?
Is using exit() the same as using return?
What is assert and when would I use it?
Using which language Test cases are added in .ptu file of RTRT unit testing???
wap in c to accept a number display the total count of digit
how can we print hellow world programme without using semicolon
What does 4d mean in c?
what is volatile in c language?
9 Answers Cap Gemini, HCL, Honeywell, TCS, Tech Mahindra,
What will be the result of the following program? main() { char p[]="String"; int x=0; if(p=="String") { printf("Pass 1"); if(p[sizeof(p)-2]=='g') printf("Pass 2"); else printf("Fail 2"); } else { printf("Fail 1"); if(p[sizeof(p)-2]=='g') printf("Pass 2"); else printf("Fail 2"); } } a) Pass 1, Pass 2 b) Fail 1, Fail 2 c) Pass 1, Fail 2 d) Fail 1, Pass 2 e) syntax error during compilation