Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


write a C program, given number is double without using addt
ion and multiplication operator?ex:n=6,ans=12,pls send me ans
to goviseenu@gmail.com

Answers were Sorted based on User's Feedback



write a C program, given number is double without using addt ion and multiplication operator?ex:n=6..

Answer / vadivelt

Do shift the given number left once.
ie., n<<1

Is This Answer Correct ?    8 Yes 1 No

write a C program, given number is double without using addt ion and multiplication operator?ex:n=6..

Answer / manoj sharma

You can use left bitwise operator.
Say if your no is n then n<<1 will return n*2.

Is This Answer Correct ?    3 Yes 1 No

write a C program, given number is double without using addt ion and multiplication operator?ex:n=6..

Answer / paramesh

#include<stdio.h>
#include<conio.h>
void main()
{
int a;
printf("Enter the number")
scanf("%d",&a);
printf("%d double number is %d", a,a<<1);
getch();
}

Is This Answer Correct ?    1 Yes 0 No

write a C program, given number is double without using addt ion and multiplication operator?ex:n=6..

Answer / sandeep

#include<stdio.h>
#include<conio.h>
void main()
{
int num;
printf("Enter a floating point value");
scanf("%f",&num);
printf("Given no is %f and twice of number is %f"num,num-(-num));
getch();
}

Is This Answer Correct ?    0 Yes 0 No

write a C program, given number is double without using addt ion and multiplication operator?ex:n=6..

Answer / venu

lol, you can't use bitwise operators on double. can be used
only for integers.

Is This Answer Correct ?    0 Yes 1 No

write a C program, given number is double without using addt ion and multiplication operator?ex:n=6..

Answer / manish soni bca 3rd year jaipu

#include<stdio.h>
#include<conio.h>
void main()
{
int a;
printf("Enter number which you want to
double");
scanf("%d",&a);
printf("THE NUMBER IS %d AND DOUBLE NO IS %
d.",a,a<<1);
getch();//optional to write getch();
}

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

Explain the red-black trees?

0 Answers  


What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

0 Answers  


User define function contain thier own address or not.

2 Answers  


Disadvantages of C language.

0 Answers   Impetus,


write a program to swap two numbers without using temporary variable?

3 Answers  


What is the total generic pointer type?

0 Answers  


What is difference between stdio h and conio h?

0 Answers  


What is dynamic variable in c?

0 Answers  


dibakar & vekatesh..uttejana here..abt ur reply for in place reversal of linked list..wats p stands for there?

1 Answers  


What is a struct c#?

0 Answers  


Concat two string with most overlapped substring has to removeĀ  "abcd"+ "cdef" = "abcdef

6 Answers  


What does struct node * mean?

0 Answers  


Categories