Posts

Write a Program to count the currency notes.

A cashier has currency notes of denominations 10, 50 and 100. If the amount to be withdrawn is input through the keyboard, find the total number of currency notes of each denomination the cashier will have to give the withdrawer. Source Code: 

Sum the digits

If a 5 digit integer number is input through the keyboard, Write a program to print the sum of all the digits from taken input.  Sample input: 54321 output: 15 Explanation: 5+4+3+2+1=15 Source Code: 

C Quiz Part-II

1. What will be the output of the following c code? #include <stdio.h> extern int x; int main(){     do {         do {              printf( "The value of x is: %o" ,x);          }          while (!-2);     }     while (0);     return 0; } int x=8; Output : The value of x is 10   Explanation    What is extern Type ?   What is %o ? (2) What will be output of following c code?          #include <stdio.h> int main(){     int i=2,j=2;     while (i+1?--i:j++)          printf( "%d" ,i);     return 0; } Explanation (3) What will be output of following c code? #include <stdio.h> int main(){     int x=011,i;     for (i=0;i<x;i+=3){          printf( "Start " );          continue ;          printf( "End" );     }     return 0; } Explanation (4)What will be output of following c code? #include <stdio.h