Here is my question, where is the issue? I run my compiler and get nothing for warnings or errors, but after entering the first two inputs command prompt gets shutdown. What would cause that?
Code:
#include <stdio.h>
int combine (int, float, char);
int main ()
{
int a;
float b;
char c;
printf ("Enter an interger:");
scanf ("%d",&a);
printf ("Enter a floating interger:");
scanf ("%f",&b);
printf ("Enter a character:");
scanf ("%c",&c);
puts (combine (a,b,c));
system ("Pause");
return 0;
}
int combine (int ger,float oat,char har)
{
int d;
float e;
char f;
int string[81];
sprintf(string, "%d %f %c",d,e,f);
return (string [81]);
}
I find this more agrivating than getting errors all day long.