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...

Differences between Puts and Gets in C Programming | C programming

Differences between "puts" and "gets" in C Programming

We can read a string using the %s conversion specification in the scanf function. However, it has a limitation that the strings entered cannot contain spaces and tabs. To overcome this problem, the C standard library provides the gets function. It allows us to read a line of characters (including spaces and tabs) until the newline character is entered, i. e., the Enter key is pressed. A call to this function takes the following form:

gets(s);

where s is an array of char, i. e., a character string. The function reads characters entered from the keyboard until a newline is entered and stores them in the argument string s, The newline character is read and converted to a null character (\O) before it is stored in s. The value returned by this function, which is a pointer to the argument string s, can be ignored. The C standard library provides another function named puts to print a string on the display. A typical call to this function takes the following form:

puts(s);

where s is an array of char, i. e., a character string. This string is printed on the display followed by a newline character.

Example: String I/O using the gets and puts function

Consider the code segment given below.

char str[81];

puts("Enter a line of text:\n");

gets (str);

puts("You entered:\n")

puts(str);

A line of text typically contains 80 characters. Thus, the array str has been declared to store 81 characters with a provision to store the null terminator. The output of this code segment is shown below.

Enter a line of text:

Programming in C language is fun'

You entered:

Programming in C language is fun!

Popular posts from this blog

Eliminating Epsilon transition (ε-Transitions) | Conversion of Epsilon-NFA to DFA | Conversion of Epsilon-NFA to NFA | Theory Of Computation (TOC)

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

Top 10 Programming Language to learn in 2023