Functions - Programming

Q1:

Which of the following statement is correct about the program given below?
#include<iostream.h>
#include<string.h>
#include<malloc.h>
class AptitudeString
{
    char txtName[20]; 
    public:
    AptitudeString(char *txtTemp = NULL)
    {
        if(txtTemp != NULL)
        strcpy(txtName, txtTemp);
    }
    void Display(void)
    {
        cout<<txtName;
    }
};
int main()
{
    char *txtName = (char*)malloc(10);
    strcpy(txtName, 'AptitudeCrack');
    *txtName = 48;
    AptitudeString objTemp(txtName);
    cout<< sizeof(txtName);
    return 0; 
}

A Above program will display AptitudeCrack 8.

B Above program will display AptitudeCrack 9.

C Above program will display size of integer.

D Above program will display AptitudeCrack and size of integer.

E Above program will display 1.

ANS:B - Above program will display AptitudeCrack 9.

No answer description is available. Let's discuss.