FUNDAMENTALS OF COMPUTER

COMPUTER PROGRAMMING FUNDAMENTALS

WHAT IS PROGRAMMING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
If string ____ name=‘Programming techniques’. What is the output of print(string ____ name[12:16])?
A
tech
B
tec
C
echn
D
techn
Explanation: 

Detailed explanation-1: -print("5” + “3") Why was the output 53 ? Sololearn: Learn to code for FREE!

Detailed explanation-2: -We can print a string in C using puts(), printf(), for loop, and recursion method. We have to pass a string character array name in the puts() function as an argument to print the string in the console. We can use the %s format specifier in the printf() function to print the character array in the console.

Detailed explanation-3: -In C programming, the collection of characters is stored in the form of arrays. This is also supported in C++ programming. Hence it’s called C-strings. C-strings are arrays of type char terminated with null character, that is, (ASCII value of null character is 0).

There is 1 question to complete.