|
Related Questions |
View Answer |
|
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
|
View Answer
|
|
How can do search for data in a linked list ?
|
View Answer
|
|
When does the compiler not implicitly generate the address of the first element of an array ?
|
View Answer
|
|
What is page thrashing ?
|
View Answer
|
|
When should the register modifier be used? Does it really help ?
|
View Answer
|
|
When should the volatile modifier be used ?
|
View Answer
|
|
What is the result of using Option Explicit ?
|
View Answer
|
|
Difference between const char* p and char const* p
|
View Answer
|
|
Can you tell me how to check whether a linked list is circular ?
|
View Answer
|
|
How to reduce a final size of executable ?
|
View Answer
|
|
How to reduce a final size of executable ?
|
View Answer
|
|
What is the output of printf("%d") ?
|
View Answer
|
|
What is hashing ?
|
View Answer
|
|
#include<conio.h> main() { int x,y=2,z,a; if(x=y%2) z=2; a=2; printf("%d %d ",z,x); }
|
View Answer
|
|
main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }
|
} - C Interview Questions & Answers">
View Answer
|
|
#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }
|
} - C Interview Questions & Answers">
View Answer
|
|
void main() { int const * p=5; printf("%d",++(*p)); }
|
} - C Interview Questions & Answers">
View Answer
|
|
Can we have nested header files in C?
|
View Answer
|
|
What is the difference between object and reference?
|
View Answer
|
|
How to write a 'C' program to read an array of 10 numbers and print the prime nums?
this is what i wrote could someone tell me where is my mistake? can i use here flag at all?
#include <stdio.h>
void main () { int arr[10], i, j, flag;
for (i=0;i<10;i++)
scanf ("%d", &arr[i]);
for (i=0;i<10;i++) { flag=1;
for (j=2;j<=(arr[i]/2); j++) { if (arr[i]%j==0) { flag=0; break;
} } }
for (i=0;i<10;i++) { if (flag=1)
printf ("%d", arr[i]); }
|
View Answer
|