Write a program to print all the prime numbers with in the
given range
Answer Posted / om
void find_primenumber_in_range(int r1,int r2)
{
int i,j;
for(i=r1;i<=r2;i++)
{
for(j=2; j<=(i/2); j++)
if(i%j==0)
break;
if(j== (i/2 +1))
printf("%d\t",i);
}
}
Is This Answer Correct ? | 31 Yes | 21 No |
Post New Answer View All Answers
What is the difference between scanf and fscanf?
Explain what are the advantages and disadvantages of a heap?
Difference between goto, long jmp() and setjmp()?
Why does the call char scanf work?
What is pass by value in c?
design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.
write a c program to find the sum of five entered numbers using an array named number
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
Differentiate between a structure and a union.
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
Can we assign integer value to char in c?
Is there anything like an ifdef for typedefs?
What is s in c?
What are the restrictions of a modulus operator?
What is new line escape sequence?