ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
write a addition of two no. program with out using
printf,scanf,puts .
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: write a addition of two no. program with out using printf,scanf,puts .
Answer
# 1
#define PRINT printf("%d",a+b)
void main()
{
 int a=8,b=7;
 PRINT;
 getch();
}
 
Is This Answer Correct ?    3 Yes 3 No
Vaibhav
 
  Re: write a addition of two no. program with out using printf,scanf,puts .
Answer
# 2
#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 ?    0 Yes 0 No
Sayyedibrahim
 
 
 
  Re: write a addition of two no. program with out using printf,scanf,puts .
Answer
# 3
#include<stdio.h>
int main()
{
 int a=2,b=3,sum =0;
 while(a--){
 sum = sum+b;
 puts(sum);

}
 
Is This Answer Correct ?    3 Yes 2 No
Dally
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
how many header file is in C language ?  14
write a program in 'c' to find the value of p[i+1]^n.p,i,n are arguments of a macro and n is a integer  1
Unsigned char c; for ( c=0;c!=256;c++2) printf("%d",c); No. of times the loop is executed ? Mascot3
Total of how many functions are available in c?  2
what is the use of pointers  5
what will be the output: main(){char ch;int a=10;printf("%d",ch);} Wipro29
how to print value of e(exp1)up to required no of digits after decimal?  1
9.how do you write a function that takes a variable number of arguments? What is the prototype of printf () function? 10.How do you access command-line arguments? 11.what does ‘#include<stdio.h>’ mean? 12.what is the difference between #include<> and #include”…”? 13.what are # pragma staments? 14.what is the most appropriate way to write a multi-statement macro?  1
what is the difference between declaration and definition of a variable or function ?  2
can we write a program in c for printf and scanf without using header file stdio.h  1
What is the output of following program ? int main() { int x = 5; printf("%d %d %d\n", x, x << 2, x >> 2); } Qualcomm3
what is link list?  2
what is the use of using linked list and array? Infosys9
Determine if a number is a power of 2 at O(1).  1
i want to have a program to read a string and print the frequency of each character and it should work in turbo c  2
When you call malloc() to allocate memory for a local pointer, do you have to explicitly free() it?  2
Given an array of numbers, except for one number all the others occur twice. Give an algorithm to find that number which occurs only once in the array.  4
Why cann't whole array can be passed to function as value.  1
wap to print "hello world" without using the main function. TCS16
what are brk, sbrk? Oracle1
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com