Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password

Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.

Question

Converts lowercase letter to uppercase
click to flip
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't know

Question

What is the output of the given program?

#include <iostream>

#include <ctype.h>

int main ()

{

int i=0;

char str[]="first line \n second line \n";

while (!iscntrl(str[i]))

{

putchar (str[i]);

i++;

}

r
Remaining cards (42)
Know
0:00
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

FA3 ComProg

QuestionAnswer
Converts lowercase letter to uppercase toupper()
What is the output of the given program? #include <iostream> #include <ctype.h> int main () { int i=0; char str[]="first line \n second line \n"; while (!iscntrl(str[i])) { putchar (str[i]); i++; } r 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 this is a test
Which of the following is a cstring function? 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 HELLO WORLD!
A function used to concatenate strings strcat()
Returns true if character expression is either a letter or a digit otherwise false isalnum ()
Check if a character is blank isblank()
Which of the following converts string to float? stof
Which of the following function converts the string to an integer? stoi
A header file that handles string in C++ string
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; } input provided by user
The sequence of contiguous characters in memory is called _____________ Character strings
What is the identifier given to string class to declare string objects? 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; } a
It returns true if str is an empty string str.empty();
What is the output of the given program? #include <iostream> #include <string> using namespace std; int main () { string str1 = "Hello "; string str2 = "World"; cout << ""; return 0; } Blank output
Which of the following is correct? char str[80];
Check if a character is alphanumeric isalnum()
It returns the lowercase version of a character expression: 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; } blank screen
Returns true provided character expression is a whitespace character, such as the blank or newline character, otherwise, returns false. 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; } 79
If two strings are identical, then the strcmp() function returns: 0
The append operator is denoted by: +=
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 Word is found at index 10
What is the output of the given program? #include <iostream> #include <string> using namespace std; int main () { string str1 = "This is a test"; cout << str1.empty(); return 0; } 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 Hello World
What is the header file for the string class? #include <string>
What is the output of the following program? #include <iostream> #include <string> using namespace std; int main () { string myString = "Hello"; myString[0] = 'J'; cout << myString; return 0; } Jello
Compares up to num characters of the C string str1 to those of the C string str2 strncmp()
Returns true if the provided character expression is a printing character other than whitespace, a digit, or a letter; otherwise returns false. ispunct()
Returns true provided character expression is an uppercase letter otherwise it returns false isupper()
Returns true if character expression is a digit 0 through 9 otherwise false isdigit()
Which of the following is a ctype function? isalpha ()
Which of the following is used to read a line of input? getline()
Which of the following function allows you to read on a character? get()
Check the following program #include <iostream> #include <ctype.h> using namespace std; int main () { int i; char str[]="c3po...??"; i=0; while (isalnum(str[i])) i++; cout << "The first " << i << " characters are al 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 + " " + Hello Programming!
What is the output of the following program? #include <string> #include <iostream> using namespace std; int main() { string x = "Bad "; cout << x.append(Romance); return 0; } Error
What is the output of the following program? #include <string> #include <iostream> using namespace std; int main() { string x = "Bad "; cout << x.append("Liar"); return 0; } Bad Liar
If a = “$512” then a is a: string
Which of the following operator can be used also in strings? -
Created by: crystallll
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards