write a addition of two no. program with out using
printf,scanf,puts .
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
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
how to swap 4 number without using temporary number?
Why do we use & in c?
coding for Fibonacci.?
How to set file pointer to beginning c?
What are dangling pointers? How are dangling pointers different from memory leaks?
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.?
What is the purpose of realloc()?
What are pointers in C?
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.
What is wrong with this statement? Myname = 'robin';