Hello everyone. I used to come here for learning C++ but now I'm leaning C. So I want to know that can I post problems related to C programming here? Is there any other site like this for C too?If yes. Do tell me. Because this is the best site I know and everyone here is really kind and helpful.
This is my code btw. Every time I run it. It compiles and run. Lets me enter a value then this error occurs " C Programming.exe has stopped working "
#include <stdio.h>
int main(void)
{
int donuts;
int loopcount;
int total;
int average;
while (loopcount <5)
{
printf("Enter the number of donuts you ate:");
scanf("%d\n", donuts);
loopcount++;
total = total + donuts;
}
average = total/5;
printf("The average of donuts eaten is: %d", average);
getch();
}
If you post C questions here I recommend that you make it very clear that you are asking about C (mentioning C in the topic title is probably a good idea) because otherwise there is a big chance that people will yell at you for not using modern C++ features.
If you post C questions here I recommend that you make it very clear that you are asking about C (mentioning C in the topic title is probably a good idea) because otherwise there is a big chance that people will yell at you for not using modern C++ features.
Quoted for relevance.
In your journey to master the C language, you might find these links relevant: