4) Write a program that takes a 5 digit number and
calculates 2 power
that number and prints it.
i have done maximum par but i m findind problem in the
commented area.
please help...

Answer Posted / ansh

#include<stdio.h>
void main()
{
int a;
long int b=1;
scanf("%d",&a);
printf("%d\n",a);
b=b<<a;
printf("%lu",b);
getch();
}

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is scope of variable in c?

554


What is structure in c definition?

566


What are high level languages like C and FORTRAN also known as?

675


What is quick sort in c?

577


How many types of errors are there in c language? Explain

561






What is difference between constant pointer and constant variable?

618


What is the explanation for cyclic nature of data types in c?

640


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

582


What is strcpy() function?

650


What is the purpose of void in c?

612


Can i use “int” data type to store the value 32768? Why?

747


This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory

719


What is calloc malloc realloc in c?

585


What is wild pointer in c with example?

568


What are the 5 types of inheritance in c ++?

574