Results 1 to 4 of 4

Thread: Segmentation Fault in C program

  1. #1
    Expert Member
    Join Date
    May 2006
    Answers
    114

    Segmentation Fault in C program

    When we do a C program what are the reasons for getting segmentation fault. In other words highlight the situation under which one might get segmentation fault while doing C program


  2. #2
    Junior Member
    Join Date
    Jan 2008
    Answers
    2

    Re: Segmentation Fault in C program

    when one fails to use the same number of closing braces as that of the opening braces.


  3. #3
    Junior Member
    Join Date
    Jan 2008
    Answers
    2

    Re: Segmentation Fault in C program

    when one fails to use the same number of closing braces as thet of the opening braces one may get segmentation problem.


  4. #4
    Expert Member
    Join Date
    Jan 2008
    Answers
    133

    Re: Segmentation Fault in C program

    When the rules to programming haven't been adhered, there are segmentation problems occurring. However, the compiler may pass successfully through the code, since there will not be any compilation errors....E.g: trying to print an integer as a string should generate a seg fault.
    I don't think I understood ghosh answer. Not using same number of closing braces should actually lead you to a compilation error.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact