Write a program that takes a 5 digit number and calculates
2 power
that number and prints it.

Answers were Sorted based on User's Feedback



Write a program that takes a 5 digit number and calculates 2 power that number and prints it...

Answer / kbhargava.ygl

dont know..tell someeone if u know it

Is This Answer Correct ?    2 Yes 0 No

Write a program that takes a 5 digit number and calculates 2 power that number and prints it...

Answer / sushant shrivastava

include<math.h>
include<stdio.h>


int main()
{
int i,num;

printf("Enter the value of i");
scanf("%d",&i)

num=POW(i,2);

printf("%d%d",num);

}

Is This Answer Correct ?    2 Yes 0 No

Write a program that takes a 5 digit number and calculates 2 power that number and prints it...

Answer / 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

Write a program that takes a 5 digit number and calculates 2 power that number and prints it...

Answer / usha

#include<stdio.h>

void main()
{
unsigned long int s=1;

int n;
scanf("%d%d",&n);


for(int i=0; i<n; i++)
{
s=s*2;
}


printf("result %ld",s);
getch();
}

Is This Answer Correct ?    1 Yes 3 No

Write a program that takes a 5 digit number and calculates 2 power that number and prints it...

Answer / akshay

#include<stdio.h>
#include<conio.h>
//Develo0ed by Akshay p.Joy
void main()
{
unsigned long int a,s=1;

int i,j,k,l,m,n;
scanf("%d%d",&m);


for(i=0;i<2;++i)
{
s=s*m;
}


printf("result %ld",s);
getch();
}

Is This Answer Correct ?    5 Yes 11 No

Post New Answer

More C Interview Questions

How to write the code of the program to swap two numbers with in one statement?

2 Answers  


When is an interface "good"?

1 Answers  


Can you please explain the scope of static variables?

0 Answers  


#include <stdio.h> #define sqr(x) (x*x) int main() { int x=2; printf("value of x=%d",sqr(x+1)); } What is the value of x?

16 Answers   Accel Frontline, Opera, Oracle,


int main() { int *p=new int; *p=10; del p; cout<<*p; *p= 60; cout<<*p; } what will be the output & why?

4 Answers   TCS,






main() { int ptr[] = {1,2,23,6,5,6}; printf("%d",&ptr[3]-&ptr[0]); }

8 Answers   Vector,


Write a program to find the smallest and largest element in a given array in c language

11 Answers   Microsoft, Vembu,


what is answer for perfect number????????????????

1 Answers  


#include<stdio.h> int main() { int i=0,j=1,k=2,m,n=0; m=i++&&j++&&k++||n++; printf("%d,%d,%d,%d,%d",i,j,k,m,n); }

12 Answers   Capital IQ, Sasken,


What are the ways to a null pointer can use in c programming language?

0 Answers  


Explain what are compound statements?

0 Answers  


Explain what is the best way to comment out a section of code that contains comments?

0 Answers  


Categories