Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 days ago.
Improve this question
How can write a code for power of any number in c language in program I have given base & exponent using for loop then inside for loop define power=power*base &then print base, exponent
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am doing a project on railway reservation system, my program is working fine, but when I close the program and then again start booking tickets,seat no again takes the previous value, I'm doing the project in c.
You'll need to write all of the data to a file before the program closes, and then read the data from the file when the program starts again.
That's right.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am coding a program and I wonder on which OS my program will run.
How can I get the OS info (ex - Windows 10 or not) at the code?
※ I just want to show different results whether it's Windows 10 or not
#ifdef _WIN32
printf("Windows\n");
#else
printf("Not Windows\n");
#endif
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I want to have some information about (#include)
in the beginning of my C program.
What does this library do?I have search before and found nothing.....
#include is a preprocessor directive, not a library. You can read below Wikipedia page about it.
https://en.wikipedia.org/wiki/Include_directive
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
i have to make my random function to generate through the current system time generate between 0 to 9
You can use the modulus operator:
milliseconds % 10;
See here: http://www.cprogramming.com/tutorial/modulus.html
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I came across this piece of code, but am not able to entirely make sense of it:
(((x)[y] << 8) | (x)[(y)+1])
where x is a pointer to a const unsigned char and y is an integer.
It extracts the 16-bit big-endian value starting at index y from array x.