

MCQOPTIONS
Saved Bookmarks
1. |
Which of the following statement is correct about the program given below? #include<iostream.h> #include<string.h> #include<malloc.h> class BixString { char txtName[20]; public: BixString(char *txtTemp = NULL) { if(txtTemp != NULL) strcpy(txtName, txtTemp); } void Display(void) { cout<<txtName; } }; int main() { char *txtName = (char*)malloc(10); strcpy(txtName, "IndiaBIX"); *txtName = 48; BixString objTemp(txtName); cout<< sizeof(txtName); return 0; } |
A. | Above program will display IndiaBIX 8. |
B. | Above program will display IndiaBIX 9. |
C. | Above program will display size of integer. |
D. | Above program will display IndiaBIX and size of integer. |
E. | Above program will display 1. |
Answer» C. Above program will display size of integer. | |