Jump to content

C++ Programming/Exercises/Variables and types

From Wikibooks, open books for an open world
  1. include<iostream>
  2. include<cstdio>

using namespace std; int main() { char name[100]; int count=0; cout<<"enter a string"; gets(name); while(name[count]!='10') { count++; } cout<<"length of the string is"<<count; }