Write a program to store Name, Age and address of student

Name age and address of students are stored in a string..


Select To use this code as it is.. select and copy paste this code into code.cpp file :)



  1. #include<iostream.h>
  2. #include<conio.h>
  3. #include<stdio.h>
  4. void main()
  5. {
  6. clrscr();
  7. char name[100],age[100],address[100];
  8. cout<<"Please enter a name: ";
  9. gets(name);
  10. cout<<"Please enter age: ";
  11. //Coding by: Snehil Khanor
  12. //http://WapCPP.blogspot.com
  13. gets(age);
  14. cout<<"Please eneter address: ";
  15. gets(address);
  16. cout<<endl<<endl<<"Name is: "<<name<<endl<<"Age is: "<<age<<endl<<"Address is:
  17. "<<address;
  18. getch();
  19. }

Check out this stream