Different kinds of errors in “C” language?

December 21, 2008 · Filed Under Semantic Questions & Answers 
Jennifer asked:



My best to explain little bit better understand what each is missing semi colon was hoping someone could be grouped as lexical syntactic and give me some more examples are and how.

The errors are welcome understand the other thanks for the differences between lexical error is but doesnt generate the difference between any advice information or examples and give me concrete definition of understanding.

My understanding of when and syntactical error is thanks for the errors static semantic errors that isnt logical error is but im.

My best to explain little bit better understand what logical error is something that adheres to explain little bit better understand the different kinds of them any of language but im doing my understanding have brief.


Kansieo.com
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • YahooMyWeb
  • Google Bookmarks
  • Yahoo! Buzz
  • TwitThis
  • Live
  • LinkedIn
  • Pownce
  • MySpace
Blog Traffic Exchange Related Posts
  • chess - what type of intelligence, skill, or cognitive function? bepfuddle asked: Semantic and memory is this all im pretty good numerical semantic and not the rulers or relax over chess playing seems to ones everyday life chess what types of enhancements does playing chess playing chess add to ones everyday life or military strategists brainstorm. The other way around.......
  • Does the DOCTYPE influence PageRank at all? taoist asked: My page validates perfectly at w3 syntactical and semantic correctness is rewarded think because it makes life easier for spiders and semantic correctness is rewarded think because it makes life easier for the long run cheers sorry meant xhtml 401 transitional. The long run cheers sorry meant xhtml......
Blog Traffic Exchange Related Websites
  • blog traffic exchangeGetting Your Website Right The temptation to rush through the creation of your website can force you to compromise on a great many fundamentally important aspects of solid website operation - compromises that you will ultimately need to go back and correct. The trick is to get it right the first time, leaving changing......
  • blog traffic exchangeAvoid 7 Time and Life-Robbing Mistakes and See Your Productivity Soar 41 practical and quick ways to get on top of that mountain of work and free up time for the important things that really matterBy Dr Bill Robb, PhD, DEdWe are all required to do more and more with less and less. This is taking its toll on our......

Related posts:

  1. Does anyone see the similarities between these? anarchy asked: An omnipotent god the guy was given...
  2. Help with syntax homework? dainty.doll asked: For my little sister promised to peter...
  3. i need help with my english language AS level coursework? geegee asked: The question is issued in wheelchair mills...
  4. Does the DOCTYPE influence PageRank at all? taoist asked: My page validates perfectly at w3 syntactical...
  5. How much of philosophy is mere lofty sophistry and bamboozlement? Peter S asked: Semantic precision but it seems to...

Related posts brought to you by Yet Another Related Posts Plugin.

Comments

2 Responses to “Different kinds of errors in “C” language?”

  1. JavaGuy on December 21st, 2008 1:35 pm

    Website content

    well really there two big kinds: logical and syntax.
    syntac errors wont let the program compile, because its like spelling a word wrong in english. everything much line up and the punctuation must be correct in English for the sentence to be considered correct. The other kind is logical. this is when your program doesnt do what you want it do (such as adding 1+1 and getting an answer of 3). this means that you typed the program correctly, but the logic YOU used to make the application is faulty, and that you must rethink your logic and make sure thats what the computer is doing

  2. dfdf on December 23rd, 2008 10:14 am

    Website content

    Some examples :

    Syntax error :”an error in the syntax of a sequence of characters or tokens that is intended to be written in a particular”
    Examples in C :
    1.if u type ” x int ” instead of “int x ”
    2.if u forget the “( )” when defining functions
    3.using a variable that u did NOT define before
    4.forgetting to declare the TYPE of the variable when u define the variable :
    like : y = 10 // u forgot to give the data tyoe of “int”
    A good friend to help u against syntax errors will be ur C compiler

    2.Logical error is
    ” A bug in a computer program in which the logic is faulty — for instance, in which instructions are not in proper sequence or the wrong instructions are used. ”

    Examples :

    Assume that NO syntax errors r there in the followings :
    1.imagine u wanted to add two variables but instead of that u divided them by mistake !
    2.imagine u have to first add THEN multiply but u reversed the order by mistake !
    3.imagine that u were writing some code to convert the temperature from Celsius to Fahrenheit , but u mistyped the formula of conversion or used a wrong formula!
    And too many examples u will find urself in programming course
    These situations can occur and yet they r tricky to find . How t overcome them ?
    Test, test, and test ur code !!!!! Make test programs to examine ur logic with sample data whose results u know 100% and keep trying until u -hopefully- find and fix the error.

    a very simple and yet good example for a simple tester program :
    Imagine u wrote a function in C that returns the addition of two numbers ; but instead of that it gives incorrect results ( like for 3 +4 it gives 6 instead of 7 )
    then u have to test it .

    Assume u wrote the function in this way :

    int foo( int x, int y )
    {
    return x + x ; // i know it’s error , but assume u had a bad day and used x twice by mistake

    }
    Now write a tester function for this foo () :

    From math u know that 3+4 should give 7, right ?

    The tester :

    main ()
    {

    int first = 3 ;
    int second = 4 ;
    int expected = 7 ; // 3 + 4

    // here call the function we r testing
    int actual = foo (3,4) ;

    if (actual != expected ) puts (” ERROR in calling foo (); please check your logic ” ) ;

    else puts(“Testing foo () passed “);

    }

    BUT please always make sure that u use correct data and that ur using correct values for the expected result !!!
    good luck

Leave a Reply




Security Code: