-1

I am very new to C programming.Can you please let me know where my error is and why is that so?

With the program on (Pelles C) given below Im finding an error viz.

POLINK: fatal error: Access is denied.
*** Error code: 1 ***
#include<stdio.h>

int main(void)
{        
    int n,sum;

    printf("Enter the value of n(<=1000):");        
    scanf("%d",&n);        
    sum=n*(n+1)/2;        
    printf("The sum is=%d \n",sum);

    return 0;        
}
Jabberwocky
  • 48,281
  • 17
  • 65
  • 115
user53119
  • 11
  • 1
  • 3

2 Answers2

0

Try running Pelles C as an administrator. You can do this using three steps (windows only):

  1. Right-click the Pelles C icon on your desktop (or wherever you installed it)

  2. Select "Run as administrator"

  3. Enter your main system account password. Ask your administrator if you are not the main user.

This error may also occur if another PellesC program is running at the same time. Make sure that all other instances of your project is closed.

adrian
  • 1,439
  • 1
  • 15
  • 23
0

The error has nothing to do with your code, to inform you.

To solve this...

1) Restart Pelles C (Make sure to save your work. Not my problem if the work is gone)

2) Reboot your computer (Again, its not my problem if your stuff is gone)

3) Run Pelles C as an Administrator. To run it, right click the Pelles C icon and click on Run as administrator. You may need permissions from the administrator.