Program to check whether a word starts with a capital
letter or not.
Answer / zaideeabu
// Untested possible answer
// Which perhaps combined C & C++ style :P
#include <iostream.h>
#include <string.h>
int main(int argc, char * argv[])
{
char cA = 'A';
char cZ = 'Z';
char str[1024] = {0};
strncpy(str, argv[1], 1024);
if ( str[0] <= cA || str[0] >= cZ )
cout << "String: " << str << " does not start with
capital letter." << endl;
else
cout << "String: " << str << " starts with capital
letter."
return 0;
}
Is This Answer Correct ? | 4 Yes | 3 No |
How to hide the base class functionality in Inheritance?
what is difference between thread and programme.
What does oop mean in snapchat?
What is namespace?
What is polymorphism in oops with example?
for example A,B,C,D are class all the 4 class contain one method who() but the method who() implementaion is differnet among each class. the relation among the 4 class are A is base class and is inherited by B and C.and from this two B and C where D is inherited. the question is i want to display the output who() method in all the classes(A,B,C,D)the output of who() method is diferrent amond all the class(A,B,C,D) ------A------ virtuval who(print a) override | | who(print b) B C override who(print c) | | -------D------ override who(print d)
Tell me the scenario,Where we can use interfaces or Abstract class.And What is the difference between interfaces and abstract class?
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).
2. Give the different notations for the class.\
What causes polymorphism?
program in c++ that can either 2 integers or 2 floating point numbers and output the smallest number
Whats oop mean?