Write a program to check whether the number is prime and also
check if it there i n fibonacci series, then return true
otherwise return false
Answer / surendra
include<stdio.h>
int main(){
int k,r;
long int i=0l,j=1,f;
//Taking maximum numbers form user
printf("Enter the number range:");
scanf("%d",&r);
printf("FIBONACCI SERIES: ");
printf("%ld %ld",i,j); //printing firts two values.
for(k=2;k<r;k++){
f=i+j;
i=j;
j=f;
printf(" %ld",j);
}
return 0;
}
Is This Answer Correct ? | 3 Yes | 4 No |
Write a C function to search a number in the given list of numbers. donot use printf and scanf
Finding a number which was log of base 2
main() { extern int i; i=20; printf("%d",i); }
Given a list of numbers ( fixed list) Now given any other list, how can you efficiently find out if there is any element in the second list that is an element of the first list (fixed list)
3 Answers Disney, Google, ZS Associates,
main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }
‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }
Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,
Link list in reverse order.
What is the main difference between STRUCTURE and UNION?
main() { int *j; { int i=10; j=&i; } printf("%d",*j); }
main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }