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 |
main() { int i=5; printf("%d",++i++); }
why array index always strats wuth zero?
‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }
Given n nodes. Find the number of different structural binary trees that can be formed using the nodes.
16 Answers Aricent, Cisco, Directi, Qualcomm,
Print an integer using only putchar. Try doing it without using extra storage.
main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }
void main() { unsigned giveit=-1; int gotit; printf("%u ",++giveit); printf("%u \n",gotit=--giveit); }
main() { int c=- -2; printf("c=%d",c); }
#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?
What is full form of PEPSI
What is "far" and "near" pointers in "c"...?