Warning: Undefined variable $user in /home/geekint/public_html/learn/wp-content/plugins/google-plus-authorship/google-plus-authorhip.php on line 28
Warning: Attempt to read property "ID" on null in /home/geekint/public_html/learn/wp-content/plugins/google-plus-authorship/google-plus-authorhip.php on line 28
Deprecated: Function get_bloginfo was called with an argument that is deprecated since version 2.2.0! The
home
option is deprecated for the family of bloginfo()
functions. Use the url
option instead. in /home/geekint/public_html/learn/wp-includes/functions.php on line 6114Deprecated: Function get_the_author_ID is deprecated since version 2.8.0! Use get_the_author_meta('ID') instead. in /home/geekint/public_html/learn/wp-includes/functions.php on line 6114
Warning: Undefined variable $customprofilefield in /home/geekint/public_html/learn/wp-content/plugins/author-box-with-different-description/author_box_display.php on line 66
Deprecated: Function get_the_author_description is deprecated since version 2.8.0! Use get_the_author_meta('description') instead. in /home/geekint/public_html/learn/wp-includes/functions.php on line 6114
Warning: Undefined variable $display_author_email in /home/geekint/public_html/learn/wp-content/plugins/author-box-with-different-description/author_box_display.php on line 152
Warning: Undefined variable $display_google_profile in /home/geekint/public_html/learn/wp-content/plugins/author-box-with-different-description/author_box_display.php on line 152
Warning: Undefined variable $display_facebook_profile in /home/geekint/public_html/learn/wp-content/plugins/author-box-with-different-description/author_box_display.php on line 152
Warning: Undefined variable $display_twitter_profile in /home/geekint/public_html/learn/wp-content/plugins/author-box-with-different-description/author_box_display.php on line 152
Warning: Undefined variable $display_youtube_profile in /home/geekint/public_html/learn/wp-content/plugins/author-box-with-different-description/author_box_display.php on line 152
Warning: Undefined variable $display_linkedin_profile in /home/geekint/public_html/learn/wp-content/plugins/author-box-with-different-description/author_box_display.php on line 152
Warning: Undefined variable $display_pinterest_profile in /home/geekint/public_html/learn/wp-content/plugins/author-box-with-different-description/author_box_display.php on line 152
Why to avoid goto in C
C has goto statement but one must ensure not to use too much of goto statement in their program because its functionality is limited and it is only recommended as a last resort if structured solutions are much more complicated.
First let us understand the goto statement, its syntax and functionality.
The goto is a unconditional branching statement used to transfer control of the program from one statement to another.
Syntax of goto statement is:
goto namel;
…………. ………….
…………. ………….
…………. ………….
name1:
Statement;
Here in goto,
name1 mentioned identifies the place where the branch is to be made.
name1 is a valid variable name followed by a colon.
name1 is placed immediately before the statement where the control is to be transformed.
A program may contain several goto statements. The names mentioned in goto must be unique for branching.
Control can be transferred out of or within a compound statement and control can be transferred to the beginning of a compound statement. However the control cannot be transferred into a compound statement.
One must take care not to use too much of goto statements in their program or in other words use it only when needed. This is because C being a highly structured language one must take care not to use too much of these unconditional goto branching statements. The goto statement is discouraged in C, because it alters the sequential flow of logic that is the characteristic of C language. This word is redundant in C and encourages poor programming style.