MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / main

Function main

CPP/char array/init.cpp:12–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11using namespace std;
12signed main(){
13 // char a[]={'a','b','c','\0'};
14 char a[]= "abcdef";
15
16 cout<<a<<endl;
17 cout<<strlen(a)<<endl;
18 cout<<sizeof(a)<<endl; // here we are getting +1 size because there
19 // is a null char in the string which is being stored.-----
20 char xyz[100];
21 cin>>xyz;// by using this cin we can only store one
22 // word as a char arrray.-------
23 // if we wanna store "hello world" it willl only store
24 // hello as char array.:(-------
25 cout<<xyz;
26
27
28 return 0;
29}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected