Write a program to print prime nums from 1-20 using c
programing?

Answer Posted / ricky dobriyal

sorry for above output mistake:

output :1 2 5 7 11 13 17 19

Is This Answer Correct ?    21 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are global variables?

642


What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

601


What is static memory allocation? Explain

627


Can you write the function prototype, definition and mention the other requirements.

656


What is the difference between struct and union in C?

568






Explain the difference between strcpy() and memcpy() function?

590


How many parameters should a function have?

661


Write a simple code fragment that will check if a number is positive or negative.

704


If the size of int data type is two bytes, what is the range of signed int data type?

583


What is a stream in c programming?

588


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

727


What is an array in c?

593


What does c mean in basketball?

561


What are the standard predefined macros?

629


Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58

1115