Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Deal With Errors in C Programming ? 2011-12
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
How to Deal With Errors in C Programming ? 2011-12

A single error can result in error messages for subsequent correct statements. This generally happens with statements that refer to something that is supposed to be defined by a statement containing an error. If a statement that defines something has an error, then what was supposed to be defined won’t be.

Example program showing an error:

#include<stdio.h>
int main(void)
{
printf("If at first you don\’t succeed, try, try, try again!")
return 0;
}

If you now try to compile this program, you’ll see an error message shown below:

Syntax error : missing ‘;’ before ‘}’
HELLO.C – 1 error(s), 0 warning(s)

The compiler is able to determine precisely the error and its location. There should be a semicolon at the end of that printf() line. It’s so easy to forget a comma or a bracket, or to just press the wrong key. Even experienced programmers make exactly the same mistakes—even after years of practice. However, with experience you will make fewer mistakes and be able to locate and fix the errors without much difficulty.

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  array project code c++ 2011 Vuhelper 0 1,298 12-10-2011, 06:32 PM
Last Post: Vuhelper
  factorial in C++ code 2011 Vuhelper 0 971 12-10-2011, 06:31 PM
Last Post: Vuhelper
  stack during function call in C++ 2011 Vuhelper 0 2,046 11-05-2011, 05:05 PM
Last Post: Vuhelper
  What is the Thing Queue? in c++ 2011 Vuhelper 0 1,801 11-05-2011, 05:02 PM
Last Post: Vuhelper
  ASCII to char conversion code in C++ 2011 Vuhelper 0 1,741 11-05-2011, 05:01 PM
Last Post: Vuhelper
  How to write a summation in a sequence? C++ 2011-12 Vuhelper 2 1,378 09-19-2011, 04:53 AM
Last Post: Xpert
  GetPixel problem in c++ 2011-12 Vuhelper 0 2,522 09-18-2011, 07:12 PM
Last Post: Vuhelper
  C++ with loop code 2011-12 Vuhelper 0 1,002 09-18-2011, 07:09 PM
Last Post: Vuhelper
  how can i read the last letter of a input file? 2011 Vuhelper 0 1,849 09-12-2011, 10:24 PM
Last Post: Vuhelper
  Different syntax? in c++ 2011-12 Vuhelper 0 1,784 09-12-2011, 10:22 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support