Quote:
Originally Posted by
Hodor
I can answer your question very easily (for a start look at line 23 and what the condition is) but I have to wonder what you're trying to achieve. If you're trying to learn programming then, I have to ask, why are you choosing C? Although your problem does contain C that doesn't make sense the bigger problems, as far as I can tell, are problems with logic. In my opinion you need to concentrate on logic first and then worry about other things. Is C the best language for you to learn logic? You seem to be missing fundamental knowledge. Trying to learn C at the same time as trying to learn problem solving skills might not the best use of your time
I am not too good in c language but I am working on it by writing my own program.
I develop logic on the page before writing the program.
There is one logic error in code but I think program should be found smallest number in the array
Edit
Code:
#include<stdio.h>
int main (void)
{
int size, array[];
printf (" Enter size of array \n");
scanf("%d", &size);
printf("%d /n", size);
return 0;
}
error: array size missing in 'array'
int size, array[];
^~~~~
warning: unused variable 'array' [-Wunused-variable]