Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C++ Programming
»
Functions
Which of the following statement is correct about the program given below? #include<iostream.h> #include<string.h> #include<malloc.h> class CuriousTabString { char txtName[20]; public: CuriousTabString(char *txtTemp = NULL) { if(txtTemp != NULL) strcpy(txtName, txtTemp); } void Display(void) { cout<<txtName; } }; int main() { char *txtName = (char*)malloc(10); strcpy(txtName, "CuriousTab"); *txtName = 48; CuriousTabString objTemp(txtName); cout<< sizeof(txtName); return 0; }
Above program will display CuriousTab 8.
Above program will display CuriousTab 9.
Above program will display size of integer.
Above program will display CuriousTab and size of integer.
Above program will display 1.
Show Answer
Correct Answer:
Above program will display CuriousTab 9.
← Previous
Next →
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment