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 |
Display the time of the system and display the right time of the other country
Write a prog to accept a given string in any order and flash error if any of the character is different. For example : If abc is the input then abc, bca, cba, cab bac are acceptable, but aac or bcd are unacceptable.
void main() { int i=5; printf("%d",i++ + ++i); }
/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }
String reverse with time complexity of n/2 with out using temporary variable.
main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }
29 Answers IBM, TCS, UGC NET, Wipro,
how to return a multiple value from a function?
How can you relate the function with the structure? Explain with an appropriate example.
How to return multiple values from a function?
What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
What are the files which are automatically opened when a C file is executed?
main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }