hey guys. i have a program i have to write for uni. i need some help if you have the time. i know this is basic stuff but i missed quite a few lectures, so i am behind. ( as a note arrays are not allowed in this specific homework).


here my code
Code:
#include <stdio.h>

int
main(int argc, char **argv) {
int junk, yy, mh, dd, hh, mn, ss;
double lat, lon, altitude, time;
scanf("%lf,%lf,%d,%lf,%lf,%4d-%2d-%2d,%2d:%2d:%2d",&lat, &lon, &junk, &altitude, &time, &yy, &mh, &dd, &hh, &mn, &ss);
printf(" Stage 1\n ========\n GPS trace commences:");
printf("%04d-%02d-%02d,%02d:%02d:%02d",yy, mh, dd, hh, mn, ss);
return 0;
}
when i input a single line of data it works. but when i ask it to search a text file and print the date/time of the first ROW of proper data, i always get weird values (image below):

http://i.imgur.com/MWfY9.jpg