write a c programs to do multiplication of two numbers with
out using arithmatic operator ??????????
Answer Posted / mohan0877
#include<stdio.h>
main()
{
int a,b,result;
print("Enter values of a and b :")
scanf{"%d %d",&a,&b};
result=0;
while(b!=0)
{
if(b&01)
resultresul+a;
a<<=1;
b>>=1;
}
}
| Is This Answer Correct ? | 3 Yes | 13 No |
Post New Answer View All Answers
Why flag is used in c?
What is header file definition?
Is c weakly typed?
What is the purpose of sprintf?
Who developed c language and when?
Explain what is the stack?
What is a void * in c?
Are there constructors in c?
What is the total generic pointer type?
What are the three constants used in c?
What is meant by operator precedence?
How can you pass an array to a function by value?
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
What is the difference between array and structure in c?
Can we access array using pointer in c language?