Thread: Syntax checking in C

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    47

    Syntax checking in C

    Q. In context of C language syntax checking, which of the following can be modeled using Finite Automata?

    (A) Detecting proper termination of an instruction.
    (B) Detecting balance of parentheses.
    (C) Detecting initialization of a variable.
    (D) None of the above.

    Can anybody give correct option with explaination

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Given that this is clearly a homework exercise, I suggest you read this link.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  3. #3
    Registered User
    Join Date
    Jul 2010
    Posts
    47
    Quote Originally Posted by grumpy View Post
    Given that this is clearly a homework exercise, I suggest you read this link.
    No friend its not the homework, I am solving MCQ on C and came across this question, thanks for the link

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Multiple choice questions are a type of homework exercise. The point of homework is to work out the right answer on your own - or to at least try - in order to learn. You'll be more likely to get help if you provide reasoning for what YOU think the answer is. You see, that demonstrates genuine effort.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  5. #5
    Registered User
    Join Date
    Jul 2010
    Posts
    47
    Quote Originally Posted by grumpy View Post
    Multiple choice questions are a type of homework exercise. The point of homework is to work out the right answer on your own - or to at least try - in order to learn. You'll be more likely to get help if you provide reasoning for what YOU think the answer is. You see, that demonstrates genuine effort.
    Yes I always ask questions after my efforts, according to me its option C because I had read in Finite state Automata theory that it is used in lexical analysis phase for identifying identifiers , keywords etc, but I am not sure about the answer so I want clarification, hope you understand now that its not HOMEWORK

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Syntax checking
    By Will Winans in forum C Programming
    Replies: 2
    Last Post: 08-08-2012, 10:38 PM
  2. Array Syntax Versus Pointer Syntax
    By LyTning94 in forum C++ Programming
    Replies: 6
    Last Post: 12-06-2011, 10:56 AM
  3. Checking for ' in an if
    By swanley007 in forum C++ Programming
    Replies: 3
    Last Post: 06-30-2006, 07:36 AM
  4. Checking an App
    By Wanted420 in forum Windows Programming
    Replies: 1
    Last Post: 10-20-2003, 03:48 AM
  5. checking for any key
    By Cprogrammer in forum C Programming
    Replies: 2
    Last Post: 10-13-2003, 10:38 AM