FA3 ComProg
Quiz yourself by thinking what should be in
each of the black spaces below before clicking
on it to display the answer.
Help!
|
|
||||
---|---|---|---|---|---|
Converts lowercase letter to uppercase | show 🗑
|
||||
show |
first line
🗑
|
||||
What is the output of the given program? #include <cctype> #include <iostream> #include <cstring> using namespace std; int main() { char str[] = "THIS IS A TEST"; for (int i=0; i<strlen(str); i++) putchar(tolower | show 🗑
|
||||
show | strcpy()
🗑
|
||||
What is the output of the given program? #include <iostream> #include <ctype.h> using namespace std; int main () { int i=0; char str[]="hello world!\n"; char c; while (str[i]) { c=str[i]; if (islower(c | show 🗑
|
||||
A function used to concatenate strings | show 🗑
|
||||
show | isalnum ()
🗑
|
||||
Check if a character is blank | show 🗑
|
||||
Which of the following converts string to float? | show 🗑
|
||||
Which of the following function converts the string to an integer? | show 🗑
|
||||
A header file that handles string in C++ | show 🗑
|
||||
What is the output of the following program? #include <string> #include <iostream> using namespace std; int main() { string str; cin>>str; cout<<str; return 0; } | show 🗑
|
||||
The sequence of contiguous characters in memory is called _____________ | show 🗑
|
||||
show | string
🗑
|
||||
What is the output of the given program? #include <iostream> #include <string> using namespace std; int main() { string s = 'a'; cout<<s; return 0; } | show 🗑
|
||||
show |
str.empty();
🗑
|
||||
show | Blank output
🗑
|
||||
Which of the following is correct? | show 🗑
|
||||
show | isalnum()
🗑
|
||||
show | tolower()
🗑
|
||||
What is the output of the given program? #include <iostream> #include <ctype.h> int main () { int i=0; char str[]="first line "; return 0; } | show 🗑
|
||||
show |
isspace()
🗑
|
||||
What is the output of the given program? #include <iostream> #include <string> #include <cmath> using namespace std; int main () { string s ="79"; int n = stoi(s); cout << n; return 0; } | show 🗑
|
||||
If two strings are identical, then the strcmp() function returns: | show 🗑
|
||||
The append operator is denoted by: | show 🗑
|
||||
What is the output of the given program? #include <iostream> #include <string> using namespace std; int main () { string str1 = "This is a test"; string str2 = "test"; cout << "Word is found at index " << str1.find(str2 | show 🗑
|
||||
show | 0
🗑
|
||||
What is the output of the following program? #include <iostream> #include <string> using namespace std; int main () { string str1 = "Hello "; string str2 = "World"; string str3; str3 = str1.append(str2); cout << s | show 🗑
|
||||
show |
#include <string>
🗑
|
||||
show | Jello
🗑
|
||||
Compares up to num characters of the C string str1 to those of the C string str2 | show 🗑
|
||||
show |
ispunct()
🗑
|
||||
show | isupper()
🗑
|
||||
Returns true if character expression is a digit 0 through 9 otherwise false | show 🗑
|
||||
Which of the following is a ctype function? | show 🗑
|
||||
show | getline()
🗑
|
||||
Which of the following function allows you to read on a character? | show 🗑
|
||||
show | 5
🗑
|
||||
What is the output of the following program? #include <iostream> #include <string> using namespace std; int main() { string s1 = "Hello"; string s2 = "Programming"; cout<< s1 + " " + | show 🗑
|
||||
show | Error
🗑
|
||||
show | Bad Liar
🗑
|
||||
If a = “$512” then a is a: | show 🗑
|
||||
show | -
🗑
|
Review the information in the table. When you are ready to quiz yourself you can hide individual columns or the entire table. Then you can click on the empty cells to reveal the answer. Try to recall what will be displayed before clicking the empty cell.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.
Normal Size Small Size show me how
Normal Size Small Size show me how
Created by:
crystallll