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 |
why oops need in programming
Input: enter the value:1234 output: 1 2 3 4 write a program to get above output.....
4 Answers Bally Technologies, IBM, SoftSol,
When is a memory allocated to a class?
how to tackle technical questions
Why multiple inheritance is not possible?
what is the difference between ERROR and EXCEPTION?
What are generic functions and generic classes?
what is namespace? what are the uses of namespace?
When is an object created and what is its lifetime?
What is overloading in oop?
can main method be overloaded...??? How..????
what is multi level inheritance give n example ?
13 Answers HDFC, Hulas Steel, Ness Technologies,