Forum: C++ Jun 3rd, 2005 |
| Replies: 28 Views: 42,745 I tried using the sizeof operator as suggested above. But everytime for an int array it gives "1" as output and for a char array it gives "4". No matter how many elements I store in the array.
I... |
Forum: C Jun 3rd, 2005 |
| Replies: 3 Views: 1,275 Thanks! I tried using it but the compiler fails to recognize this function. Is it present in the stdlib?
Is the usage like,
check_flag = find_first_not_of(abc) ;
//where to I give the string... |
Forum: C May 31st, 2005 |
| Replies: 3 Views: 1,275 If your input is "abc". What would be the logic to accept the strings, bca,acb,bac,cab,cba,abc (ie. the same string with chars placed in any order)
and reject all other input strings like aab, cdb,... |
Forum: C++ May 31st, 2005 |
| Replies: 28 Views: 42,745 I guess this would be helpful,
/******for a static array********/
char inp[4];
for (n=0;inp[n];n++)
; //do nothing inside the loop
cout<<n; //n will display the number of elements in the array... |