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

Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

1 Answers  


Struct(s) { int a; long b; } Union (u) {int a; long b; } Print sizeof(s)and sizeof(u) if sizeof(int)=4 and sizeof(long)=4

2 Answers   Mascot,


how to swap 4 number without using temporary number?

2 Answers  


Why do we use & in c?

0 Answers  


coding for Fibonacci.?

1 Answers  


How to set file pointer to beginning c?

0 Answers  


What are dangling pointers? How are dangling pointers different from memory leaks?

1 Answers  


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

0 Answers   Infosys,


What is the purpose of realloc()?

0 Answers  


What are pointers in C?

5 Answers   KPIT,


Which of the following about automatic variables within a function is correct ? a.its type must be declared before using the variable b.they are local c.they are not initialised to zero d.they are global.

6 Answers   FCI, TCS,


What is wrong with this statement? Myname = 'robin';

0 Answers  


Categories