ALLInterview.com :: Home Page            
 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                      
Google
   
 
Categories >> Software >> Programming Languages >> C
 
 


 

 
 C interview questions  C Interview Questions (2266)
 C++ interview questions  C++ Interview Questions (1121)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (652)
Question
write a c program to add two integer numbers without using 
arithmetic operator +
 Question Submitted By :: C
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
main()
{
int a,b,c;
printf("enter a,b values:");
scanf("%d%d",&a,&b);
c=((a)-(-b));
printf("a+b="&c);
}
 
Is This Answer Correct ?    60 Yes 3 No
Praveenkumar
 
Answer
# 2
#include<stdio.h>
#include<conio.h>
void main()
{
int a=10,b=20;
clrscr();
while(b--) a++;
printf("Sum is :%d",a);
getch();
}
 
Is This Answer Correct ?    19 Yes 7 No
Vijayram600
 
 
 
Answer
# 3
main()
{
int a,b,c;
printf("enter a,b values:");
scanf("%d%d",&a,&b);
c=((a)-(-b));
printf("sum of a,b is %d",c);
}
 
Is This Answer Correct ?    9 Yes 3 No
Venky
 
Answer
# 4
#include<iostream.h>
int main()
{
int a,b;
cout<<"Enter a and b";
cin>>a;
cin>>b;
while(a!=0)
{
++b;
a--;
}
cout<<b;
return 0;
}
 
Is This Answer Correct ?    4 Yes 1 No
Sushma Sarma
 
Answer
# 5
a = 53;
int c = 0b10000000;
int d = c;
printf("c=%d\n",c);
s = 30;

while(c>0){
int d = c;
if (a&d){
while ((s&d)&&(d<=128)) {
s = (s&~d);
d = d<<1;
}
d = (d<=128)?d:0;
s = s|d;
}
c = c>>1;
}
printf("s=%d\n",s);
 
Is This Answer Correct ?    3 Yes 1 No
Maksim
 
Answer
# 6
void main()
{
int a=20,b=40;
for( ;b<=1;b--)
a++;
printf("%d",a);
}
 
Is This Answer Correct ?    6 Yes 4 No
Raja
 
Answer
# 7
main()
{
int a,b,c;
printf("enter the values a,b");
scanf("%d%d",&a,&b);
c=a-(~b)-1;
printf("the sum is %d",c);
}
 
Is This Answer Correct ?    1 Yes 0 No
Sivaprabhu
 
Answer
# 8
main()
{
int a,b,c;
printf("enter a,b values:");
scanf("%d%d",&a,&b);
c=((a)-(~b)+1);
printf("sum of a,b is %d",c);
}
 
Is This Answer Correct ?    0 Yes 0 No
Syamanth
 
Answer
# 9
#include<stdio.h>
#include<conio.h.
void main()
{
int a=10,b=20,c;
c=a-(-b);
printf("%d\n",c);
getch();
}
 
Is This Answer Correct ?    0 Yes 0 No
Nandu
 
Answer
# 10
a=0x08;
d=0x02;
e=a|d;
 
Is This Answer Correct ?    2 Yes 7 No
Mohith
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
write a function to swap an array a[5] elements like a[0] as a[5],a[1] as a[4],....a[5] as a[0].without using more than one loop and use one array not to use temp array? Zensar 1
what is the difference between unix os and linux os   4
How can I return multiple values from a function?   6
What has to put when we are inserting as assembly language code into the C code? or When we are inserting as assembly language code into the C code we have to insert one thing at the start and of the assembly language. What are they?   2
write a C code to reverse a string using a recursive function, without swapping or using an extra memory. Motorola 9
different between overloading and overriding   3
What is that continue statement??   4
how to find out the union of two character arrays?   2
Heyyy All, Just a challenge . A C program with if Else if(){ /// insert sumthing print ("in if") // insert sumting } else { ///// insert sumthing print ("in else"); //// insert sumthing } can anyone modify it so that program prints. if and else both   3
Implement a function that returns the 5th element from the end in a singly linked list of integers in one pass. Microsoft 11
write a c program to remove all the duplicate characters in a string and replace with single character? ex:-input- AAABBBCCC output- ABC HCL 2
why you will give me a job in TCS. TCS 7
 
For more C Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com