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...


how i m write c program 1.check prime number 2.prime number
series



how i m write c program 1.check prime number 2.prime number series..

Answer / sulthan

#include<stdio.h>
void main()
{
int a,i,n=0;
printf("\nEnter the Number");
scanf("%d",&a);
for(i=1;i<=a;i++)
if(a%i==0)
n++;
if(n=2)
printf("Prime")
else
printf("NOT Prime");
}

Is This Answer Correct ?    5 Yes 2 No

Post New Answer

More C Interview Questions

Why is C called a middle-level language?

1 Answers  


what is a function pointer and how all to declare ,define and implement it ???

4 Answers   Honeywell,


main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }

6 Answers  


How can I increase the allowable number of simultaneously open files?

1 Answers   CSC,


What is the total generic pointer type?

0 Answers  


Explain how do you generate random numbers in c?

0 Answers  


What is a pragma?

0 Answers  


If the static variable is declared as global, will it be same as extern?

1 Answers   Samsung,


What is the output of the below program and how it is? void main() { static int var=5; printf("%d",var--); if(var) main(); }

8 Answers   MindFire, TCS, Tech Mahindra,


how to build a exercise findig min number of e heap with list imlemented?

0 Answers  


the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset

0 Answers  


Explain what is the benefit of using an enum rather than a #define constant?

0 Answers  


Categories