Home > Back-end >  Have a great god help me to look at this problem
Have a great god help me to look at this problem

Time:09-17

#include
Int Max (int x, int y)
{
Int t;
If (t> Y)
T=x;
The else
T=y;
Return t;
}
Int min (int x, int y)
{
Int u;
If (uU=x;
The else
U=y;
The return of u;
}
Int main ()
{
Int a, b, c, n;
Int (* p) (int, int);
Printf (" please input a, b value: ");
Scanf_s (" % d % d ", & amp; A, & amp; B);
Printf (" please enter 1 or 2: ");
Scanf_s (" % d ", & amp; n);
If (n==1)
{
P=Max.
C=(* p) (a, b);
Printf (" Max=% d \ n ", c);
}

Else if (n==2)
{
P=min;
C=(* p) (a, b);
Printf (" min=% d \ n ", c);
}
return 0;
}
[img=https://img-bbs.csdn.net/upload/201901/24/1548342888_425543.png] [/img I think excuse me] why this period of debugging in VS2010 will appear this error, what is the cause of this error?

CodePudding user response:

Uninitialized local variable t Max function, min function also uninitialized local variables u
 
Int Max (int x, int y)
{
Return the x & gt; y ? X: y;
}

Int min (int x, int y)
{
Return the x & lt; y ? X: y;
}
  • Related