Write a program that takes a 5 digit number and calculates
2 power that number and prints it(should not use big
integers and exponential functions)
Answer Posted / nitin katakdound
int main(int argc, char *argv)
{
long two_power, five_digit_number;
if(scanf("%ld",&five_digit_number)){
two_power = five_digit_number*five_digit_number;}
printf("\n 2 power of that number is %ld",two_power);
return 0;
}
| Is This Answer Correct ? | 13 Yes | 29 No |
Post New Answer View All Answers
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
Can you mix old-style and new-style function syntax?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
What is the correct code to have following output in c using nested for loop?
pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)
Can static variables be declared in a header file?
Differentiate abs() function from fabs() function.
What is the difference between functions abs() and fabs()?
Is a house a shell structure?
What is spaghetti programming?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
How variables are declared in c?
What is header file definition?