Strings
Gapfill exercise
Enter your answers in the gaps. When you have entered all the answers, click on the "Check" button.
What is the difference between char array and string literal?
There are two main differences between char array and literal.
We need to add the null
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
'\0' at the end of the array by ourself whereas, it is
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
internally by the
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
in the case of the character array.
The string literal cannot be reassigned to another set of
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
whereas, we can
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
the characters of the
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
.
Describe Traversing String?
Traversing the string is one of the most important
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
in any of the
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
languages. We may need to manipulate a very large text which can be done by traversing the text.
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
string is somewhat
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
from the traversing an integer
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
. We need to know the length of the array to traverse an
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
array, whereas we may use the null
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
in the case of
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
to identify the end the string and
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
the loop.
Hence, there are two ways to
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
a string.
By using the
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
of string
By using the
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
character.
Describe gets() function?
he gets()
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
enables the user to enter some
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
followed by the enter key. All the
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
entered by the user get stored in a
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
array. The null character is added to the array to make it a
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
. The gets() allows the user to enter the
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
-separated strings. It
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
the string entered by the user.
Describe puts() functions?
The puts() function is very much similar to
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
() function. The puts() function is used to print the string on the
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
which is previously read by using gets() or scanf() function. The
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
()
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
returns an integer value
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
the number of
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
being printed on the console. Since, it prints an additional newline
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
with the string, which moves the
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
to the new line on the console, the
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
value returned by puts() will always be equal to the number of
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
present in the string plus 1.
What are the different String functions?
1)strlen(string_name) -
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
the length of
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
name.
2)
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
(destination, source) - copies the
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
of source string to
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
string.
3)
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
(first_string, second_string) - concats or joins first string with
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
string. The result of the string is
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
in first string.
4)
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
(first_string, second_string)- compares the first
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
with second string. If both strings are same, it
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
0.
5)
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
(string)- returns reverse string.
6)strlwr(string)- returns string characters in
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
.
7)
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
(string)-
appended
array
aspects
character
characters
compiler
console
contents
cursor
destination
different
function
integer
length
lowercase
null
printf
programming
puts
reassign
representing
returns
second
space
stored
strcat
strcmp
strcpy
string
strrev
strupr
terminate
traverse
Traversing
string characters in uppercase.
Check
OK