Logo 
Search:

c programming Interview FAQs

Submit Interview FAQ
No Records Found!!!
Go Ahead and Post your Interview FAQ
Home » Interview FAQs » c programmingRSS Feeds
C++ Programming
Comments: 0

What will be the output of the mentioned code 6?

Consider the following code snippet:

char *a,b;
if(typeid(a)==typeid(b))
cout<<"a";
else
cout<<"b";

What will be the output of the above code?

Options

a) b
b) a
c) Compilation error
d) No output

Answer : a) b
Posted By:Shruti Sharma      Posted On: Dec 15

C++ Programming
Comments: 0

Which casting operator can cast a pointer to any other type of pointer in ANSI C++?

Options

a) const_cast
b) dynamic_cast
c) reinterpret_cast
d) static_cast

Answer : c) reinterpret_cast
Posted By:Shruti Sharma      Posted On: Dec 15

C++ Programming
Comments: 0

Which of the following character literal(s) does use two bytes of memory?

Options

a) wide_character literal
b) byte_character literal
c) new_character literal
d) None of the above

Answer : a) wide_character 2literal
Posted By:Shruti Sharma      Posted On: Dec 15

C++ Programming
Comments: 0

What will be the output on executing the mentioned code 5?

Consider the following code snippet:

int p;
string s("Pass");
bool k;
if(s=="pass")
{
k=true;
}
p=true+50+false;
cout<
What will be the output on executing the above code?

Options

a) Error as the Boolean values cannot be added ...
Posted By:Shruti Sharma      Posted On: Dec 15

C++ Programming
Comments: 0

Which of the following data type(s) is introduced by ANSI C++?

Options

a) bool
b) wchar_t
c) char_t
d) Both a and b

Answer : d) Both a and b
Posted By:Shruti Sharma      Posted On: Dec 15

C++ Programming
Comments: 0

C++ supports a mechanism virtual function to achieve. select option

Options

a) compile time polymorphism
b) function overloading
c) run time polymorphism
d) operator overloading

Answer : c) run time polymorphism
Posted By:Adalfreddo Fischer      Posted On: Dec 13

C++ Programming
Comments: 0

What will be the output of the mentioned code 6?

Consider the following code snippet:

char *a,b;
if(typeid(a)==typeid(b))
cout<<"a";
else
cout<<"b";

What will be the output of the above code?

Options

a) b
b) a
c) Compilation error
d) No output

Answer : a) b
Posted By:Shruti Sharma      Posted On: Dec 15

C++ Programming
Comments: 0

Which casting operator can cast a pointer to any other type of pointer in ANSI C++?

Options

a) const_cast
b) dynamic_cast
c) reinterpret_cast
d) static_cast

Answer : c) reinterpret_cast
Posted By:Shruti Sharma      Posted On: Dec 15

C++ Programming
Comments: 0

Which of the following character literal(s) does use two bytes of memory?

Options

a) wide_character literal
b) byte_character literal
c) new_character literal
d) None of the above

Answer : a) wide_character 2literal
Posted By:Shruti Sharma      Posted On: Dec 15

C++ Programming
Comments: 0

What will be the output on executing the mentioned code 5?

Consider the following code snippet:

int p;
string s("Pass");
bool k;
if(s=="pass")
{
k=true;
}
p=true+50+false;
cout<
What will be the output on executing the above code?

Options

a) Error as the Boolean values cannot be added ...
Posted By:Shruti Sharma      Posted On: Dec 15

C++ Programming
Comments: 0

Which of the following data type(s) is introduced by ANSI C++?

Options

a) bool
b) wchar_t
c) char_t
d) Both a and b

Answer : d) Both a and b
Posted By:Shruti Sharma      Posted On: Dec 15

C++ Programming
Comments: 0

C++ supports a mechanism virtual function to achieve. select option

Options

a) compile time polymorphism
b) function overloading
c) run time polymorphism
d) operator overloading

Answer : c) run time polymorphism
Posted By:Adalfreddo Fischer      Posted On: Dec 13

  16  17  18  19  20  21  22  23  24  25  26