Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Finding first/last occurrence of a character in a string
without using strchr( ) /strrchr( ) function.

Answer Posted / sepideh

#include<iostream>
#include<conio.h>
using namespace std;
int main(){
char m[20];
char x;
gets(m);
x=getch();
for(int i=0;i!=null;i++)
if(m[i]==x){
cout<<i;}
getch();}

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between text files and binary files?

1351


What is a null string in c?

1046


In C language what is a 'dangling pointer'?

1162


write a program to display all prime numbers

1972


Explain what are multidimensional arrays?

1072


largest Of three Number using without if condition?

1604


What is methods in c?

1100


Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

2060


Give differences between - new and malloc() , delete and free() ?

1100


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

1206


For what purpose null pointer used?

1080


what is the structure pointer?

2127


How can I remove the leading spaces from a string?

1171


What is the difference between declaring a variable by constant keyword and #define ing that variable?

3373


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

2021