Top 10 Programming Language to learn in 2023

Are you a programming enthusiast looking to stay ahead of the curve in 2023? With the ever-evolving tech landscape, keeping up with the Best Programming Language to learn can be a daunting task. Fear not, as we have compiled a list of the top 10 Programming Languages that you should consider learning in 2023. Python: This versatile language continues to dominate in 2023, with its ease of use, readability, and a vast library of modules. JavaScript: As web development grows increasingly popular, JavaScript remains a crucial player, with its ability to create dynamic and interactive web pages. Java: This language has stood the test of time and remains a popular choice for enterprise software development. C++: A staple in the gaming and systems development industries, C++ offers exceptional performance and memory management. Swift: Apple's preferred language for iOS app development, Swift continues to grow in popularity with its simplicity and reliability. R: As data science and machin

GO TO Statement in C Programming | C Programming

GO TO Statement in C Programming    

The goto statement is simple statement used to transfer the program control unconditionally from one    statement to another statement. Although it might not be essential to use the goto statement in a highly    structured language like C, there may be occasions when the use of goto is desirable.       

Syntax              

a> b>               
goto label; label:            
 ………… …………             
………… …………             
………… …………             
Label: goto label;            
 Statement;    

    The goto requires a label in order to identify the place where the branch is to be made. A label is a


valid variable name followed by a colon. The label is placed immediately before the statement where the control is to be transformed. A program may contain several goto statements that transferred to the same place when a program. The label must be unique.  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. The goto statement is discouraged in C, because it alters the sequential flow of logic that is the characteristic of C language.       

Sample Code  

#include<stdio.h>    //include stdio.h header file to your program           

int main ()    //start of main          

{          

     int n, sum = 0, i = 0;   // variable declaration          

     printf ("Enter a number");   // message to the user          

      scanf ("%d", &n);   //Read and store the number           

     loop: i++;    //Label of goto statement          

     sum += i;    //the sum value in stored and I is added to sum          

      if (i < n) 

  goto loop;   //If value of I is less than n pass control to loop           

      printf ("\n Sum of %d natural numbers = %d", n, sum);   //print the sum    

return 0;      

 }

OUTPUT

GO TO Statement

        

Comments

Popular posts from this blog

Array in C Programming | C Programming

C program to Find Cartesian Product of Two Sets | C programming

What is System? | SAD