Can someone identify why I get this error?
Error C4703 potentially uninitialized local pointer variable 'pw' used
Warning C6001 Using uninitialized memory 'pw'.
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
int main()
{
char string[] = "Today exam is very easy and fun", le = 'y';
char* pStr = string, * pw;
while (*pStr)
{
if (pStr == string || *(pStr - 1) == ' ')
pw = pStr;
if (*pStr == le && (*(pStr + 1) < 'a' || *(pStr + 1) > 'z'))
{
while (pw <= pStr)
printf("%c", *pw++);
printf(" ");
}
pStr++;
while ((*pStr < 'a' || *pStr > 'z') && (*pStr < 'A' || *pStr > 'Z') && *pStr)
pStr++;
}
return 0;
}