write a addition of two no. program with out using
printf,scanf,puts .

Answers were Sorted based on User's Feedback



write a addition of two no. program with out using printf,scanf,puts ...

Answer / vaibhav

#define PRINT printf("%d",a+b)
void main()
{
int a=8,b=7;
PRINT;
getch();
}

Is This Answer Correct ?    30 Yes 14 No

write a addition of two no. program with out using printf,scanf,puts ...

Answer / sayyedibrahim

#include <stdio.h>

void putint(int x);

int main(void)
{
puts("[output]");
putint(13725);
putchar('\n');
putint(5500);
putchar('\n');
return 0;
}

void putint(int x)
{
if (x)
{
putint(x / 10);
putchar('0' + x % 10);
}
}

Is This Answer Correct ?    11 Yes 5 No

write a addition of two no. program with out using printf,scanf,puts ...

Answer / dally

#include<stdio.h>
int main()
{
int a=2,b=3,sum =0;
while(a--){
sum = sum+b;
puts(sum);

}

Is This Answer Correct ?    14 Yes 12 No

write a addition of two no. program with out using printf,scanf,puts ...

Answer / honey

void main()
{
char a,;
int i;
for(i=0;i<5;i++)
{
a=getchar();
}
for(i=0;i<5;i++)
{
putchar(a)l
}
}

Is This Answer Correct ?    6 Yes 6 No

Post New Answer

More C Interview Questions

what is the difference between %d and %*d in c languaga?

7 Answers   TCS,


What is string concatenation in c?

0 Answers  


What is the difference between constant pointer and pointer to a constant. Give examples.

4 Answers   TCS,


write a program for fibonaci series by using while loop in c?

2 Answers  


What is queue in c?

0 Answers  






what information does the header files contain?

6 Answers   BSNL, Cisco, GDA Technologies,


A marketing company wishes to construct a decision table to decide how to treat clients according to three characteristics: Gender, City Dweller, and age group: A (under 30), B (between 30 and 60), C (over 60). The company has four products (W, X, Y and Z) to test market. Product W will appeal to female city dwellers. Product X will appeal to young females. Product Y will appeal to Male middle aged shoppers who do not live in cities. Product Z will appeal to all but older females.

2 Answers  


what is the use of #pragma pack, wer it is used?

2 Answers   Wipro,


What does d mean?

0 Answers  


can we change the default calling convention in c if yes than how.........?

0 Answers   Aptech,


To find whether a number is even or odd without using any conditional operator??

12 Answers   College School Exams Tests, IBM,


why we are using semicolon at the end of printh statment

2 Answers   HCL,


Categories