Dynamic Memory


  1. What is the output of this program?
    #include <iostream> 
    #include <ctype.h>
    int main ()
    {
    int k = 0;
    char str[] = "Ajit Kumar Gupta";
    char ch;
    while (str[k])
    {
    ch = str[k];
    if (islower(ch))
    ch = toupper(ch);
    putchar (ch);
    k++;
    }
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    In this program, We have converted the lower case letters to uppercase letters by using toupper function.


  1. What kind of locale does every program is having in C++?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Every program has a single locale object which is its global locale.