Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I wrote a code using C. When I debug it this kind of error occurs. What should I do to fix it? Emain() { FILE*

I wrote a code using C. When I debug it this kind of error occurs. What should I do to fix it?image text in transcribed

Emain() { FILE* fp; Exception Unhandled X long n; char c; Unhandled exception at 0x7C73E906 (ucrtbased.dll) in Project1.exe: fp = fopen("RANDOM", "W"); An invalid parameter was passed to a function that considers invalid while ((c = getchar()) != EOF) parameters fatal. putc(c, fp); $ printf("No, of characters entered = %10 ", ftell(fp)); fclose(fp); Copy Details Start Live Share session... fp = open("RANDOM", "r"); > Exception Settings n = OL; while (feof(fp) == 0) { fseek(fp, n, 0); printf("Position of %c is %d ", getc(fp), ftell(fp)); n = n + 5L; } putchar(' '); fseek(fp, -11, 2); do { putchar(getc(fp)); } while (!fseek(fp, -2L, 1)); fclose(fp)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started