How to use power function under linux environment.eg :
for(i=1;i<=n;i++){ pow(-1,i-1)} since it alerts undefined
reference to 'pow'.
Answers were Sorted based on User's Feedback
Answer / anuj
compile the code by writing this command
gcc filename.c -lm
| Is This Answer Correct ? | 2 Yes | 2 No |
Give a one-line C expression to test whether a number is a power of 2.
What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
how to delete an element in an array
Find the largest number in a binary tree
Write a single line c expression to delete a,b,c from aabbcc
What is "far" and "near" pointers in "c"...?
why array index always strats wuth zero?
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
writte a c-programm to display smill paces
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }
struct point { int x; int y; }; struct point origin,*pp; main() { pp=&origin; printf("origin is(%d%d)\n",(*pp).x,(*pp).y); printf("origin is (%d%d)\n",pp->x,pp->y); }