Write a program to check whether a number is prime or not using c?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

How would you print out the data in a binary tree, level by level, starting at the top?

6 Answers   Amazon, Microsoft,


what will be the result of the following program ? char *gxxx() { static char xxx[1024]; return xxx; } main() { char *g="string"; strcpy(gxxx(),g); g = gxxx(); strcpy(g,"oldstring"); printf("The string is : %s",gxxx()); } a) The string is : string b) The string is :Oldstring c) Run time error/Core dump d) Syntax error during compilation e) None of these

2 Answers   IBM,


main() { int i,n=010; int sum=0; for(i=1;i<=n;i++) {s=s+i; } printf("%d",&s); getch(); }

6 Answers  


How can I convert integers to binary or hexadecimal?

2 Answers  


4)What would be the output? main() { int num=425; pf("%d",pf("%d",num)); } a)Comp error b)4425 c)4253 d)3435 e)none

10 Answers  


main() { char ch='356'; Printf("%d",ch); } *OUTPUT*:- -18 *Why?*

1 Answers  


Define a structure to store roll no, name and marks of a student. Using the structure of above write a ‘C’ program to create a file “student.dat”. There must be one record for every student in the file. Accept the data from the user.

0 Answers  


write a program to print largest number of each row of a 2D array

0 Answers  


Why c is called a middle level language?

0 Answers  


How can I invoke another program or command and trap its output?

0 Answers  


Explain demand paging.

1 Answers   Agilent,


find largest element in array w/o using sorting techniques.

3 Answers   Zycus Infotech,


Categories