C++ Programming/Exercises/Variables and types

  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; }