Write a C program to multiply tho numbers without using
arithmetic operator (+, -, *, /).



Write a C program to multiply tho numbers without using arithmetic operator (+, -, *, /)...

Answer / taz

int a=5,b=2,c,i,j;

for(i=1;i<=a;i++)
for(j=1;j<=b;j++)
c++;

printf("%d",c);

Is This Answer Correct ?    5 Yes 1 No

Post New Answer

More C Interview Questions

Is exit(status) truly equivalent to returning the same status from main?

0 Answers  


I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...

0 Answers  


diff. between *p and **p

3 Answers  


Write a code to remove duplicates in a string.

0 Answers   Expedia,


what is the maximum no. of bytes calloc can allocate

4 Answers   Mphasis,






What are the different categories of functions in c?

0 Answers  


#include<stdio.h> #include<conio.h> int main() { int a[4][4]={{5,7,5,9}, {4,6,3,1}, {2,9,0,6}}; int *p; int (*q)[4]; p=(int*)a; q=a; printf("\n%u%u",p,q); p++; q++; printf("\n%u%u",p,q); getch(); return 0; } what is the meaning of this program?

2 Answers  


how to find the largest element of array without using relational operater?

6 Answers   Satyam, Wipro,


Why is malloc used?

1 Answers  


Function shall sum members of given one-dimensional array. However, it should sum only members whose number of ones in the binary representation is higher than defined threshold (e.g. if the threshold is 4, number 255 will be counted and 15 will not) - The array length is arbitrary - output the results to the stdout

0 Answers   XYZ,


can any one tel me wt is the question pattern for NIC exam

0 Answers   NIC,


Write a C program to get the desired output. 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 . . . 1 n..............n 1 Note: n is a positive integer entered by the user.

4 Answers  


Categories