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 can you overcome the diamond problem in inheritance?
what is different between oops and c++
what is multithreading in c++ , what is difference between multithreading and singlethreading.
which feature are not hold visual basic of oop?
What is the point of oop?
Which is the parameter that is added to every non-static member function when it is called?
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.
Which is faster post increment or pre increment ? and in which cases should u use either - to increase speed?
What is the difference between procedural programming and oops?
any one please tell me the purpose of operator overloading
What is encapsulation?
What is the real time example of encapsulation?