Write a program to print all the prime numbers with in the
given range
Answer Posted / chavidi
void prime(int a,int b)
{
int i,j,c
for(i=a;i<=b;i++)
{
c=0;
for(j=1;j<=a;j++)
{
if(a%j==0)
{
c++;
}
}
if(c==2)
printf(i);
}
}
Is This Answer Correct ? | 8 Yes | 14 No |
Post New Answer View All Answers
Tell me when would you use a pointer to a function?
Why is it that not all header files are declared in every C program?
What do header files do?
What is scanf_s in c?
What is context in c?
What extern c means?
When do we get logical errors?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
What does c mean in basketball?
What is a wrapper function in c?
how is the examination pattern?
What is difference between array and structure in c?
What is the right type to use for boolean values in c?
What is difference between arrays and pointers?
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?