Write a program that takes a 5 digit number and calculates
2 power
that number and prints it.
Answer Posted / anusha
#include<stdio.h>
#include<conio.h>
main()
{
unsigned long integer n;
long integer res=1;
int i=1;
clrscr()
printf("please enter 5 digit no:");
scanf("%ld",&n);
for(i=1,i<=n,i++);
{
res=(res*2);
}
printf("Result is %ld",res);
getch();
}
| Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
What is "Hungarian Notation"?
What is the c value paradox and how is it explained?
What are the different file extensions involved when programming in C?
What is the purpose of the preprocessor directive error?
Differentiate between full, complete & perfect binary trees.
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above
What is typedef example?
Explain how can you avoid including a header more than once?
What is c system32 taskhostw exe?
What is this infamous null pointer, anyway?
Is there any possibility to create customized header file with c programming language?
What is a substring in c?
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
Why dont c comments nest?