Tuesday, 4 May 2021

String in C++ Qus - 1

 #include<stdio.h>

#include<iostream.h>

#include<conio.h>

#include<string.h>

int main()

{

clrscr();

char *S;

cout<<"Enter String"<<endl;

//cin>>S;

//cin.getline(S,3);

//gets(S);

scanf("%s",S);

int a;

scanf("%d",&a);


cout<<S<<endl<<a;

getch();

return 0;

}

No comments:

Post a Comment