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() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
How do you create a really large matrix (i.e. 3500x3500) in C without having the program crash? I can only reach up to 2500. It must have something to do with lack of memory. Please help!
What is your nationality?
How we will connect multiple client ? (without using fork,thread)
write a origram swaoing valu without 3rd variable
Write a program to print a square of size 5 by using the character S.
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
main() { int x=5; for(;x!=0;x--) { printf("x=%d\n", x--); } } a. 5, 4, 3, 2,1 b. 4, 3, 2, 1, 0 c. 5, 3, 1 d. none of the above
write the function. if all the character in string B appear in string A, return true, otherwise return false.
create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00
to remove the repeated cahracter from the given caracter array. i.e.., if the input is SSAD output should of SAD
What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }