{"id":45370,"date":"2023-12-18T17:32:08","date_gmt":"2023-12-18T12:02:08","guid":{"rendered":"https:\/\/www.aplustopper.com\/?p=45370"},"modified":"2023-12-18T17:26:13","modified_gmt":"2023-12-18T11:56:13","slug":"plus-one-computer-science-chapter-wise-questions-answers-chapter-9","status":"publish","type":"post","link":"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/","title":{"rendered":"Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions"},"content":{"rendered":"

Kerala Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions<\/h2>\n

Plus One String Handling and I\/O Functions One Mark Questions and Answers<\/h3>\n

Question 1.
\nTo read a single character for gender i.e. ‘m’ or ‘f’ ________ function is used.
\nAnswer:
\n(a) getch()
\n(b) getchar()
\n(c) gets()
\n(d) getline()
\nAnswer:
\n(b) getchar()<\/p>\n

Question 2.
\nTo use getchar(), putchar(), gets() and puts(), which header file is used?
\n(a) iostream
\n(b) cstdio
\n(c) input
\n(d) output
\nAnswer:
\n(b) cstdio<\/p>\n

Question 3.
\nTo use cin and cout, which header file is needed?
\n(a) iostream
\n(b) cstdio
\n(c) input
\n(d) output
\nAnswer:
\n(a) iostream<\/p>\n

Question 4.
\nPredict the output of the following code snippet.
\n#include<cstdio>
\nint mainO
\n{
\nchar name[ ] = “ADELINE”;
\nfor(int i=0; name[i]!=’\\0′;i++)
\nputchar(name[i]);
\n}
\nAnswer:
\nThe output is “ADELINE”.<\/p>\n

Question 5.
\nFrom the following which is equivalent to the function getc(stdin).
\n(a) putchar()
\n(b) gets()
\n(c) getchar()
\n(d) puts()
\nAnswer:
\n(c) getchar()<\/p>\n

Question 6.
\nFrom the following which is equivalent to the function putc(ch, stdout).
\n(a) putchar(ch)
\n(b) ch = gets()
\n(c) ch = getchar()
\n(d) puts(ch )
\nAnswer:
\n(a) putchar(ch)<\/p>\n

Question 7.
\nTo print a single character at a time which function is used?
\n(a) puts()
\n(b) putchar()
\n(c) gets()
\n(d) getchar()
\nAnswer:
\n(b) putchar()<\/p>\n

Question 8.
\nTo read a string _______ function is used.
\n(a) puts()
\n(b) putchar()
\n(c) gets()
\n(d) getchar()
\nAnswer:
\n(b) gets()<\/p>\n

Question 9.
\nTo print a string _______ function is used.
\n(a) puts()
\n(b) putchar()
\n(c) gets()
\n(d) getchar()
\nAnswer:
\n(b) puts()<\/p>\n

Question 10.
\nConsider the following code snippet.
\nmain()
\n{
\nchar str[80];
\ngets(str);
\nfor(int i=0. len=0;str[il!=’\\0′;i++.len++);
\ncout<<“The length of the string is ” <<len;
\n}
\nSelect the equivalent forthe under lined statement from the following
\n(a) int len = strlen(str)
\n(b) int len = strcmp(str)
\n(c) int len = strcount(str)
\n(d) None of these
\nAnswer:
\n(a) int len = strlen(str)<\/p>\n

Question 11.
\nArjun wants to read a string with spaces from the following which is suitable.
\n(\u0430) cin>>
\n(b) cin.getline(str,80)
\n(c) str = getc(stdin)
\n(d) none of these
\nAnswer:
\n(b) cin.getline(str,80)<\/p>\n

Question 12.
\nState whether the following statement is true or false. The ‘<<‘ insertion operator stops reading a string when it encounters a space.
\nAnswer:
\nTrue<\/p>\n

Question 13.
\n_________ function is used to copy a string to another variable. (SAY-2016) (1)
\nAnswer:
\nstrcpy();<\/p>\n

Question 14.<\/p>\n

    \n
  1. Write the declaration statement for a variable \u2018name\u2019 in C++ to store a string of maximum length 30.<\/li>\n
  2. Differentiate between the statement cin>>name and gets (name) for reading data to the variable \u2018name\u2019. (SAY-2016)<\/li>\n<\/ol>\n

    Answer:
    \n1. char name[31];(One for null(\\0) character).<\/p>\n

    OR<\/p>\n

    cin>> does not allows space. It will take characters up to the space and characters after space will be truncated . Here space is the delimiter. Consider the following code snippet that will take the input upto the space.
    \n#include<iostream>
    \nusing namespace std;
    \nint main()
    \n{
    \nchar name[20];
    \ncout<<\u201cEnter your name:\u201d;
    \ncin>>name;
    \ncout<<\u201cHello \u201c<<name;
    \n}
    \nIf you input a name \u201cAlvis Emerin\u201d then the output will be Hello Alvis. The string after space is truncated.<\/p>\n

    2. gets(): This function is used to get a string from the keyboard including spaces. Considerthe following code snippet that will take the input including the space.
    \n#include<iostream>
    \n#include<cstdio>
    \nusing namespace std;
    \nint main()
    \n{
    \nchar name[20];
    \ncout<<\u201cEnter your name:\u201d;
    \ngets(name);
    \ncout<<\u201cHello \u201c<<name;
    \n}
    \nIf you input a name \u201cAlvis Emerin\u201d then the output will be Hello Alvis Emerin.<\/p>\n

    Question 15.
    \nWhat is the advantage of using gets() function in the C++ program to input string data? Explain with an example.
    \nAnswer:
    \ngets() function is used to get a string from the keyboard including spaces. Consider the following code snippet that will take the input including the space.
    \n#include<iostream>
    \n#include<cstdio>
    \nusing namespace std;
    \nint main()
    \n{
    \nchar name[20];
    \ncout<<\u201cEnter your name:\u201d;
    \ngets(name);
    \ncout<<\u201cHello \u201c<<name;
    \n}
    \nIf you input a name \u201cAlvis\u201d then the output is Hello Alvis.<\/p>\n

    Plus One String Handling and I\/O Functions Two Mark Questions and Answers<\/h3>\n

    Question 1.
    \nIn a C++ program, you forgot to include the header file iostream. What are the possible errors occur in that Program? Explain?
    \nAnswer:
    \nPrototype error. To use cin and cout the header file iostream is a must.<\/p>\n

    Question 2.
    \nCategorise the following into three according to their relationship
    \niostream, cstdio, gets(), puts(), getchar(), putchar(), getline(), write(), cin, cout.
    \nAnswer:
    \n\"Plus<\/p>\n

    Question 3.
    \nPick the odd one out from the following and give reason.
    \ngets(), getline(), getch() getchar().
    \nAnswer:
    \ngetline() – It is a stream function whereas the others are console functions.<\/p>\n

    Question 4.
    \nMy_name is a variable contains a string. Write two different C++ statements to display the string. (SAY-2016) (2)
    \nAnswer:<\/p>\n

      \n
    1. cout<<my_name;<\/li>\n
    2. puts(my_name);<\/li>\n<\/ol>\n

      Question 5.
      \nSuggest most suitable built-in function in C++ to perform the following tasks: (MARCH-2016) (2)<\/p>\n

        \n
      1. To find the answer for 53<\/li>\n
      2. To find the number of characters in the string \u201cKERALA\u201d \u201cHAPPY NEW YEAR\u201d<\/li>\n
      3. To get back the number 10 if the argument is 100.<\/li>\n<\/ol>\n

        Answer:<\/p>\n

          \n
        1. pow(5,3);<\/li>\n
        2. strlen(\u201cKERALA\u201d)<\/li>\n
        3. tolower(\u2018M\u2019)<\/li>\n
        4. sqrt(100);<\/li>\n<\/ol>\n

          Question 6.
          \nRead the following C++ statements:
          \ncharstr[50];
          \ncin>>str;
          \ncout<<str;
          \nDuring execution, if the string given as input is \u201cGREEN COMPUTING\u201d, the output will be only the word \u201cGREEN\u201d. Give reason for this. What modification is required to get the original string as output? (SCERT SAMPLE -1) (2)
          \nAnswer:
          \ncin>>word;
          \ncout<<word;
          \nIt displays \u201cHAPPY\u201d because cin takes characters upto the space. That is space is the delimiter for cin. The string after space is truncated. To resolve this use gets() function.<\/p>\n

          Because gets() function reads character upto the enter key.
          \nHence gets(word);
          \nputs(word);
          \nDisplays \u201cHAPPY NEW YEAR\u201d<\/p>\n

          Question 7.
          \nSuppose M[5][5] is a 2D array that contains the elements of a square matrix. Write C++ statements to find the sum of the diagonal elements. (2)
          \nAnswer:
          \ngets() function is used to get a string from the keyboard including spaces. To use gets () function the header file cstdio must be included. It reads the characters upto the enter key pressed by the user.
          \neg:
          \nchar name[20];
          \ncout << \u201cEnter your name\u201d;
          \ngets(name);
          \ncout<< \u201cHello\u201d<< name;
          \nWhen the user gives Alvis Emerin. It displays as \u201cHello Alvis Emerin\u201d.<\/p>\n

          Plus One String Handling and I\/O Functions Three Mark Questions and Answers<\/h3>\n

          Question 1.
          \nSuresh wants to print his name and native place using a C++ program. The program should accept name and native place first.
          \nName is: Suresh Kumar
          \nAddress is: Alappuzha
          \nAnswer:
          \n#include<iostream>
          \n#include<cstdio>
          \nusing namespace std;
          \nint main()
          \n{
          \nchar name[20],place[20];
          \ncout<<“Enter your name”;
          \ncin.getline(name,80);
          \ncout<<“Enter your place”;
          \ncin.getline(place,80);
          \ncout<<“Your name is puts(name);
          \ncout<<“Your place is puts(place);
          \n}<\/p>\n

          Question 2.
          \n“Programming is Fun”. Write a C++ program to read a string like this in lower case and print it in UPPER CASE. With out using toupper() library function.
          \nAnswer:
          \nusing namespace std;
          \n#include<cstdio>
          \nint main()
          \n{
          \nchar line[80];
          \nint i;
          \nputs(Enter the string to convert”);
          \ngets(line);
          \nfor(i=0;line[i]!=’\\0′;i++)
          \nif (Iine[i]>=97 && line[i]<=122)
          \nline[i]=line[i] – 32;
          \nputs(line);
          \n}<\/p>\n

          Question 3.
          \nAn assignment Kumar has written a C++ program which reads a line of text and print the number of vowels in it. What will be his program code?
          \nAnswer:
          \n#include<cstdio>
          \n#include<cctype>
          \n#include<iostream>
          \nusing namespace std;
          \nint main()
          \n{
          \nchar line[80];
          \nint i,vowel=0;
          \nputs(Enter a string”);
          \ngets(line);
          \nfor(i=0;line[i]!=’\\0′;i++)
          \nswitch(tolower(line[i]))
          \n{
          \ncase ‘a’:
          \ncase ‘e’:
          \ncase ‘i’:
          \ncase ‘o’:
          \ncase ‘u’:
          \nvowel++;
          \n}
          \ncout<<“The number of vowels is “<<vowel;<\/p>\n

          Question 4.
          \nWhat will be the output of the following code if the user enter the value “GOOD MORNING”.
          \n1. char string [80];
          \ngets(string);
          \ncout<<string;<\/p>\n

          2. char string [80];
          \ncin>>string;
          \ncout<<string;<\/p>\n

          3. charch;
          \nch = getchar();
          \ncout<<ch;<\/p>\n

          4. char string [80];
          \ncin.getline(string,9);
          \ncout<<string;
          \nAnswer:<\/p>\n

            \n
          1. GOOD MORNING<\/li>\n
          2. GOOD<\/li>\n
          3. G<\/li>\n
          4. GOOD MORN<\/li>\n<\/ol>\n

            Question 5.
            \nConsider the following code snippet.
            \nint main()
            \n{
            \nint n;
            \ncout<<“Enter a number”;
            \ncin>>n;
            \ncout<<“The number is “<<n;
            \n}
            \nWrite down the names of the header files that must be included in this program
            \nAnswer:
            \nHere cin and cout are used so the header file iostream must be included.<\/p>\n

            Question 6.
            \nWrite a program to display the following output.
            \nA
            \nBB
            \nCCC
            \n#include<iostream>
            \nusing namespace std;
            \nint main()
            \n{
            \nchar str[]=”ABC”;
            \nint i,j;
            \nfor(i=0;i<3;i++)
            \n{
            \nfor(j=0;j<=i;j++)
            \ncout<<str[i];
            \ncout<<endl;
            \n}
            \n}<\/p>\n

            Question 7.
            \nDistinguish getchar and gets.
            \nAnswer:
            \ngetchar is a character function but gets is a string function. The header file cstdio.h must be included. It reads a character from the keyboard.
            \nEg.
            \nchar ch;
            \nch = getchar();
            \ncout<<ch;
            \ngets is used to read a string from the keyboard. It reads the characters upto enter key. The header file cstdio must be included.
            \nchar str[80J;
            \ncout<<“Enter a string”;
            \ngets(str);<\/p>\n

            Question 8.
            \nDistinguish putch and puts.
            \nAnswer:
            \nputch is a character function but puts is a string function. The header file cstdio must be included. It prints a character to the monitor.
            \nEg:
            \nchar ch;
            \nch = getc(stdin);
            \nputch(ch);
            \nputs is used to print a string. The header file stdio.h must be included.
            \ncharstr[80];
            \nputs(“Entera string”);
            \ngets(str);
            \nputs(str);<\/p>\n

            Question 9.
            \nWrite a program to check whether a string is palindrome or not. (A string is said to be palindrome if it is the same as the string constituted by reversing the characters of the original string. eg: “MALAYALAM”, “MADAM”, “ARORA”, “DAD”, etc.)
            \nAnswer:
            \n#include<iostream>
            \nusing namespace std;
            \nint main()
            \n{
            \nchar str[40];
            \nint len,i,j;
            \ncout<<“Enter a string:”;
            \ncin>>str;
            \nfor(len=0;str[len]!-\\0′;len++);
            \nfor(i=0,j=len-1;i<len\/2;i++,j–)
            \nif(str[i]!=str[j])
            \nbreak;
            \nif(i==len\/2) .
            \ncout<<str<<” is palindrome”;
            \nelse
            \ncout<<str<<” is not palindrome”;
            \n}<\/p>\n

            Question 10.
            \nExplain multi-character function.
            \nAnswer:
            \ngetline() and write() functions are multi character functions:
            \n1. getline() It reads a line of text that ends with a newline character. It reads white spaces also.
            \neg:
            \nchar line[80];
            \ncin.getline(line,80);<\/p>\n

            2. write() It is used to display a string.
            \nEg.
            \nchar line[80];
            \ncin.getline(line,80);
            \ncout.write(line,80);<\/p>\n

            Question 11.
            \nRead a string and print the number of vowels.
            \nAnswer:
            \n#include<cstdio>
            \n#include<cctype>
            \n#include<iostream>
            \nusing namespace std;
            \nint main()
            \n{
            \nchar line[80];
            \nint i,vowel=0;
            \nputs(“Enter a string”);
            \ngets(line);
            \nfor(i=0;line[i]!=’\\0′;i++)
            \nswitch(tolower(line[i]))
            \n{
            \ncase ‘a’:
            \ncase ‘e’:
            \ncase ‘i’;
            \ncase ‘o’:
            \ncase ‘u’:
            \nvowel++;
            \n}
            \ncout<<“The number of vowels is in the string is “<< vowel;
            \n}<\/p>\n

            Question 12.
            \nDistinguish between get() and put() functions.
            \nAnswer:
            \nget() function:
            \nget() is an input function. It is used to read a single character and it does not ignore the white spaces and newline character.
            \nSyntax is cin.get(variable);
            \neg: char ch;
            \ncin.get(ch);<\/p>\n

            put() function:
            \nput() is an output function. It is used to print a character.
            \nSyntax is cout.put(variable);
            \neg:
            \ncharch;
            \ncin.get(ch);
            \ncout.put(ch);<\/p>\n

            Question 13.
            \nWrite a program to read a string and print the number of consonants.
            \nAnswer:
            \n#include<iostream>
            \n#include<cstdio>
            \n#include<cctype>
            \nusing namespace std;
            \nint main()
            \n{
            \nchar str[40],ch;
            \nint consonent = 0,i;
            \ncout<<“Enter a string:”;
            \ngets(str);
            \nfor(i=0;str[i]!=’\\0′;i++)
            \n{
            \nch = toupper(str[i]);
            \nif(ch>=’B’ && ch<=’Z’)
            \nif(ch!=’E’&& ch!=’I’&& ch!=\u20190’&& ch!=’U’)
            \nconsonent++;
            \n}
            \ncout<<“The number of consonants is “<<consonent;
            \n}<\/p>\n

            Question 14.
            \nWrite a program to read a string and print the number of spaces.
            \nAnswer:
            \n#include<iostream>
            \n#include<cstdio>
            \nusing namespace std;
            \nint main()
            \n{
            \nchar str[40];
            \nint space=0,i;
            \ncout<<“Enter a string:”;
            \ngets(str);
            \nfor(i=0;str[i]!=’\\0′;i++)
            \nif(str[i]==32)
            \nspace++;
            \ncout<<“The number of spaces is “<<space;
            \n}<\/p>\n

            Question 15.
            \nDescribe in detail the unformatted console I\/O functions.
            \nAnswer:
            \n1. Single character functions: This function is used to read or print a character at a time,
            \n(i) getchar():
            \nIt reads a character from the keyboard and store it in a character variable.
            \neg:
            \nchar ch;
            \nch=getchar();<\/p>\n

            (ii) putchar():
            \nThis function is used to print a character on the screen.
            \neg:
            \nchar ch;
            \nch = getchar();
            \nputchar(ch);<\/p>\n

            2. String functions This function is used to read or print a string.
            \n(i) gets():
            \nThis function is used to read a string from the keyboard and store it in a character variable.
            \neg:
            \ncharstr[80];
            \ngets(str);<\/p>\n

            (ii) puts():
            \nThis function is used to display a string on the screen.
            \neg:
            \nchar str[80];
            \ngets(str);
            \nputs(str);<\/p>\n

            Question 16.
            \nWrite a program to input a string and find the number of uppercase letters, lowercase letters, digits, special characters and white spaces.
            \nAnswer:
            \n#include<iostream>
            \n#include<cstdio>
            \nusing namespace std;
            \nint main()
            \n{
            \nchar str[100];
            \nint i,digit=0, Ualpha=0, Lalpha=0, special=0, wspace=0;
            \ncout<<“Enter a string:”;
            \ngets(str);
            \nfor(i=0;str[i]!=’\\0′;i++)
            \nif(str[i]>=48 && str[i]<=57)
            \ndigit++;
            \nelse if(str[i]>=65 && str[i]<=90)
            \nUalpha++;
            \nelse if(str[i]>=97 && str[i]<=122)
            \nLalpha++;
            \nelse if(str[i]==’ ‘ || str[i]==’\\t’)
            \nwspace++;
            \nelse
            \nspecial++;
            \ncout<<“The number of alphabets is “<<Ualpha+Lalpha<<
            \n” the number of Uppercase letters is “<<Ualpha<< ” the number of Lowercase letters is “<<Lalpha<<” the number of digits is “<<digit<<” the special characters is “<<special<<” and the number of white spaces is “<<wspace;
            \n}<\/p>\n

            Question 17.
            \nWrite a program to count the number of words in a sentence.
            \nAnswer:
            \n#include<iostream>
            \n#include<cstdio>
            \nusing namespace std;
            \nint main()
            \n{
            \nint i,words=1;
            \nchar str[80];
            \ncout<<“Enter a string\\n”;
            \ngets(str);
            \nfor(i=0;str[i]!=’\\0′;i++)
            \nif(str[i]==32)
            \nwords++;
            \ncout<<“The number of words is “<<words;
            \n}<\/p>\n

            Question 18.
            \nWrite a program to input a string and replace all lowercase vowels by the corresponding uppercase letters.
            \nAnswer:
            \n#include<iostream>
            \n#include<cstdio>
            \nusing namespace std;
            \nint main()
            \n{
            \nchar str[100];
            \nint i;
            \ncout<<“Enter a string:”;
            \ngets(str);
            \nfor(i=0;str[i]!=\\0′;i++)
            \nif(str[i]>=65 && str[i]<=90 || str[i]> = 97 && str[i]<=122)
            \nswitch(str[i])
            \n{
            \ncase ‘a’:
            \nstr[i] = str[i]-32;
            \nbreak;
            \ncase ‘e’:
            \nstr[i] = str[i]-32;
            \nbreak;
            \ncase ‘i’:
            \nstr[i] = str[i]-32;
            \nbreak;
            \ncase ‘o’: .
            \nstr[i] = str[i]-32;
            \nbreak;
            \ncase ‘u’:
            \nstr[i] = str[i]-32;
            \n}
            \ncout<<str;
            \n}<\/p>\n

            Question 19.
            \nWrite a program to input a string and display its reversed string using console I\/O functions only. For example, if the input is “AND” the output should “DNA”.
            \nAnswer:
            \n#include<iostream>
            \nusing namespace std;
            \nint main()
            \n{
            \nchar str[40],rev[40];
            \nint len.ij;
            \ncout<<“Enter a string:”;
            \ncin>>str;
            \nfor(len=0;str[len]!=’\\0′;len++);
            \nfor(i=0,j=len-1 ;i<len;i++,j–)
            \nrev[il=str[j];
            \nrev[i]=’\\0′;
            \ncout<<“The reversed string is “<<rev;
            \n}<\/p>\n

            Question 20.
            \nWrite a program to input a word(say COMPUTER) and create a triangle as follows.
            \nC
            \nC O
            \nC O M
            \nC O M P
            \nC O M P U
            \nC O M P U T
            \nC O M P U T E
            \nC O M P U T E R
            \nAnswer:
            \n#include<iostream>
            \n#include<cstring>\/\/for strlen()
            \nusing namespace std;
            \nint main()
            \n{
            \ncharstr[20];
            \ncout<<“enter a word(eg.COMPUTER):”;
            \ncin>>str;
            \nint ij;
            \nfor(i=0;i<strlen(str);i++)
            \n{
            \nfor(j=0;j<=i;j++)
            \ncout<<str[j]<<“\\t”;
            \ncout<<endl;
            \n}
            \n}<\/p>\n

            Question 21.
            \nWrite a program to input a line of text and display the first characters of each word. Use only console I\/O functions. For example, if the input is “Save Water, save Nature”, the output should be “SWSN”.
            \nAnswer:
            \n#include<iostream>
            \n#include<cstdio>
            \nusing namespace std;
            \nint main()
            \n{
            \nint i;
            \ncharstr[80];
            \ncout<<“Enter a string\\n”;
            \ngets(str);
            \nif(str[0]!=32)
            \ncout<<str[0];
            \nfor(i=0;str[i]!=’\\0′;i++)
            \nif(str[i]==32 && str[i+1]!=32)
            \ncout<<str[i+1];
            \n}<\/p>\n

            Plus One Computer Science Chapter Wise Questions and Answers<\/a><\/h4>\n","protected":false},"excerpt":{"rendered":"

            Kerala Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions Plus One String Handling and I\/O Functions One Mark Questions and Answers Question 1. To read a single character for gender i.e. ‘m’ or ‘f’ ________ function is used. Answer: (a) getch() (b) getchar() (c) gets() (d) getline() […]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[42728],"tags":[],"yoast_head":"\nPlus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions - A Plus Topper<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions\" \/>\n<meta property=\"og:description\" content=\"Kerala Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions Plus One String Handling and I\/O Functions One Mark Questions and Answers Question 1. To read a single character for gender i.e. ‘m’ or ‘f’ ________ function is used. Answer: (a) getch() (b) getchar() (c) gets() (d) getline() […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/\" \/>\n<meta property=\"og:site_name\" content=\"A Plus Topper\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/aplustopper\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-18T12:02:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-18T11:56:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.aplustopper.com\/wp-content\/uploads\/2019\/07\/Plus-One-Computer-Science-Chapter-Wise-Questions-and-Answers-Chapter-9-String-Handling-and-I-O-Functions-2M-Q2.png\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prasanna\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.aplustopper.com\/#organization\",\"name\":\"Aplus Topper\",\"url\":\"https:\/\/www.aplustopper.com\/\",\"sameAs\":[\"https:\/\/www.facebook.com\/aplustopper\/\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.aplustopper.com\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.aplustopper.com\/wp-content\/uploads\/2018\/12\/Aplus_380x90-logo.jpg\",\"contentUrl\":\"https:\/\/www.aplustopper.com\/wp-content\/uploads\/2018\/12\/Aplus_380x90-logo.jpg\",\"width\":1585,\"height\":375,\"caption\":\"Aplus Topper\"},\"image\":{\"@id\":\"https:\/\/www.aplustopper.com\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.aplustopper.com\/#website\",\"url\":\"https:\/\/www.aplustopper.com\/\",\"name\":\"A Plus Topper\",\"description\":\"Improve your Grades\",\"publisher\":{\"@id\":\"https:\/\/www.aplustopper.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.aplustopper.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.aplustopper.com\/wp-content\/uploads\/2019\/07\/Plus-One-Computer-Science-Chapter-Wise-Questions-and-Answers-Chapter-9-String-Handling-and-I-O-Functions-2M-Q2.png\",\"contentUrl\":\"https:\/\/www.aplustopper.com\/wp-content\/uploads\/2019\/07\/Plus-One-Computer-Science-Chapter-Wise-Questions-and-Answers-Chapter-9-String-Handling-and-I-O-Functions-2M-Q2.png\",\"width\":336,\"height\":118,\"caption\":\"Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions 2M Q2\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#webpage\",\"url\":\"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/\",\"name\":\"Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions - A Plus Topper\",\"isPartOf\":{\"@id\":\"https:\/\/www.aplustopper.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#primaryimage\"},\"datePublished\":\"2023-12-18T12:02:08+00:00\",\"dateModified\":\"2023-12-18T11:56:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.aplustopper.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.aplustopper.com\/#\/schema\/person\/2533e4338ba14fc0e4001efcca2f8794\"},\"headline\":\"Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions\",\"datePublished\":\"2023-12-18T12:02:08+00:00\",\"dateModified\":\"2023-12-18T11:56:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#webpage\"},\"wordCount\":2887,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.aplustopper.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.aplustopper.com\/wp-content\/uploads\/2019\/07\/Plus-One-Computer-Science-Chapter-Wise-Questions-and-Answers-Chapter-9-String-Handling-and-I-O-Functions-2M-Q2.png\",\"articleSection\":[\"HSSLiVE\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.aplustopper.com\/#\/schema\/person\/2533e4338ba14fc0e4001efcca2f8794\",\"name\":\"Prasanna\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.aplustopper.com\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/174540ad43736c7d1a4c4f83c775e74d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/174540ad43736c7d1a4c4f83c775e74d?s=96&d=mm&r=g\",\"caption\":\"Prasanna\"},\"url\":\"https:\/\/www.aplustopper.com\/author\/prasanna\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions - A Plus Topper","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/","og_locale":"en_US","og_type":"article","og_title":"Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions","og_description":"Kerala Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions Plus One String Handling and I\/O Functions One Mark Questions and Answers Question 1. To read a single character for gender i.e. ‘m’ or ‘f’ ________ function is used. Answer: (a) getch() (b) getchar() (c) gets() (d) getline() […]","og_url":"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/","og_site_name":"A Plus Topper","article_publisher":"https:\/\/www.facebook.com\/aplustopper\/","article_published_time":"2023-12-18T12:02:08+00:00","article_modified_time":"2023-12-18T11:56:13+00:00","og_image":[{"url":"https:\/\/www.aplustopper.com\/wp-content\/uploads\/2019\/07\/Plus-One-Computer-Science-Chapter-Wise-Questions-and-Answers-Chapter-9-String-Handling-and-I-O-Functions-2M-Q2.png"}],"twitter_card":"summary","twitter_misc":{"Written by":"Prasanna","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/www.aplustopper.com\/#organization","name":"Aplus Topper","url":"https:\/\/www.aplustopper.com\/","sameAs":["https:\/\/www.facebook.com\/aplustopper\/"],"logo":{"@type":"ImageObject","@id":"https:\/\/www.aplustopper.com\/#logo","inLanguage":"en-US","url":"https:\/\/www.aplustopper.com\/wp-content\/uploads\/2018\/12\/Aplus_380x90-logo.jpg","contentUrl":"https:\/\/www.aplustopper.com\/wp-content\/uploads\/2018\/12\/Aplus_380x90-logo.jpg","width":1585,"height":375,"caption":"Aplus Topper"},"image":{"@id":"https:\/\/www.aplustopper.com\/#logo"}},{"@type":"WebSite","@id":"https:\/\/www.aplustopper.com\/#website","url":"https:\/\/www.aplustopper.com\/","name":"A Plus Topper","description":"Improve your Grades","publisher":{"@id":"https:\/\/www.aplustopper.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.aplustopper.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#primaryimage","inLanguage":"en-US","url":"https:\/\/www.aplustopper.com\/wp-content\/uploads\/2019\/07\/Plus-One-Computer-Science-Chapter-Wise-Questions-and-Answers-Chapter-9-String-Handling-and-I-O-Functions-2M-Q2.png","contentUrl":"https:\/\/www.aplustopper.com\/wp-content\/uploads\/2019\/07\/Plus-One-Computer-Science-Chapter-Wise-Questions-and-Answers-Chapter-9-String-Handling-and-I-O-Functions-2M-Q2.png","width":336,"height":118,"caption":"Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions 2M Q2"},{"@type":"WebPage","@id":"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#webpage","url":"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/","name":"Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions - A Plus Topper","isPartOf":{"@id":"https:\/\/www.aplustopper.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#primaryimage"},"datePublished":"2023-12-18T12:02:08+00:00","dateModified":"2023-12-18T11:56:13+00:00","breadcrumb":{"@id":"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.aplustopper.com\/"},{"@type":"ListItem","position":2,"name":"Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions"}]},{"@type":"Article","@id":"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#article","isPartOf":{"@id":"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#webpage"},"author":{"@id":"https:\/\/www.aplustopper.com\/#\/schema\/person\/2533e4338ba14fc0e4001efcca2f8794"},"headline":"Plus One Computer Science Chapter Wise Questions and Answers Chapter 9 String Handling and I\/O Functions","datePublished":"2023-12-18T12:02:08+00:00","dateModified":"2023-12-18T11:56:13+00:00","mainEntityOfPage":{"@id":"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#webpage"},"wordCount":2887,"commentCount":0,"publisher":{"@id":"https:\/\/www.aplustopper.com\/#organization"},"image":{"@id":"https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#primaryimage"},"thumbnailUrl":"https:\/\/www.aplustopper.com\/wp-content\/uploads\/2019\/07\/Plus-One-Computer-Science-Chapter-Wise-Questions-and-Answers-Chapter-9-String-Handling-and-I-O-Functions-2M-Q2.png","articleSection":["HSSLiVE"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.aplustopper.com\/plus-one-computer-science-chapter-wise-questions-answers-chapter-9\/#respond"]}]},{"@type":"Person","@id":"https:\/\/www.aplustopper.com\/#\/schema\/person\/2533e4338ba14fc0e4001efcca2f8794","name":"Prasanna","image":{"@type":"ImageObject","@id":"https:\/\/www.aplustopper.com\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/174540ad43736c7d1a4c4f83c775e74d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/174540ad43736c7d1a4c4f83c775e74d?s=96&d=mm&r=g","caption":"Prasanna"},"url":"https:\/\/www.aplustopper.com\/author\/prasanna\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.aplustopper.com\/wp-json\/wp\/v2\/posts\/45370"}],"collection":[{"href":"https:\/\/www.aplustopper.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aplustopper.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aplustopper.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aplustopper.com\/wp-json\/wp\/v2\/comments?post=45370"}],"version-history":[{"count":1,"href":"https:\/\/www.aplustopper.com\/wp-json\/wp\/v2\/posts\/45370\/revisions"}],"predecessor-version":[{"id":162963,"href":"https:\/\/www.aplustopper.com\/wp-json\/wp\/v2\/posts\/45370\/revisions\/162963"}],"wp:attachment":[{"href":"https:\/\/www.aplustopper.com\/wp-json\/wp\/v2\/media?parent=45370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aplustopper.com\/wp-json\/wp\/v2\/categories?post=45370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aplustopper.com\/wp-json\/wp\/v2\/tags?post=45370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}