Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
computer programming of array,character and strings
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
1. Assume that variables c (which stores a character), x, y and z are of type int, variables d, e and f are of type double and arrays string1[100] and string2[100] are of type char. Write the program below.
Write a single statement to accomplish each of the following.
(a) Assign alphabet G to c.
(b) Print the value of variable c. Do not use printf.
(c) Read a line of text into array string1 from the keyboard. Do not use scanf.
(d) Print the line of text stored in array string1. Do not use printf.
(e) Assign string “Malaysia” to array string2.
(f) Determine the length of the string in string1. Print the result.
(g) Convert the string "8.63582" to double and assign it to d.
(h) Copy the string stored in array string1 into array string2.
(i) Append 5 characters from the string in string2 to the string in string1.
2 Kommentare
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!