-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtester.cpp
More file actions
43 lines (39 loc) · 1008 Bytes
/
tester.cpp
File metadata and controls
43 lines (39 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main(){
//Testing pointer for character
// char p1[10];
// cin.get(p1,10);
// char * p = & p1[0];
// char **t = &p;
// cout<<*p;
// ++(*t);
// cout<<*p;
// cout<<(*p)++;
//------------------Testing what will happen with input[k++];
// char input[10];
// cin.get(input,10);
// int k=0;
// cout<<k;
// for(int k=0;k<5;k++)
// input[k++]='n';
// cout<<input;
//Result: we don't need an extra variable to increment
// char input[10];
// cin.get(input,10);
// int size = sizeof(input);
// for(int k=2;k<size;k++)
// input[k]=input[k+1];
// size--;
// cout<<input;
//Here we move to next element
//----------------------------------size of an array
int arr[10]={3232,2323};
cout<<sizeof(arr)<<endl;
cout<<sizeof(arr)/sizeof(arr[0])<<endl;
// cout<<arr.length();
// cout<<arr.size();
// cout<<arr.length;
// cout<<arr.size;
}