diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..0cba2e6 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "iostream": "cpp" + } +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..4d620b2 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,28 @@ +{ + "tasks": [ + { + "type": "cppbuild", + "label": "C/C++: g++.exe build active file", + "command": "C:\\mingw\\mingw64\\bin\\g++.exe", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${file}", + "-o", + "${fileDirname}\\${fileBasenameNoExtension}.exe" + ], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "Task generated by Debugger." + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/CPP/Array/Array.cpp b/CPP/Array/Array.cpp new file mode 100644 index 0000000..e8c7feb --- /dev/null +++ b/CPP/Array/Array.cpp @@ -0,0 +1,46 @@ +#include +using namespace std; +void CreateArray(int *arr,int n){ + for(int i = 0;i> arr[i]; + } + +} + +void PrintArray(int *arr,int n){ + for(int i=0;i=n){ + cout << "Invalid Index"; + return; + } + cout << "Enter new Element : "; + cin >> arr[i]; +} +int DeteteElemet(int *arr,int n,int i){ + for(int x = i;x> n; + int arr[n]; + CreateArray(arr,n); + PrintArray(arr,n); + UpdateElemet(arr,n,2); + PrintArray(arr,n); + n = DeteteElemet(arr,n,3); + PrintArray(arr,n); + return 0; + +} diff --git a/CPP/Array/Array.exe b/CPP/Array/Array.exe new file mode 100644 index 0000000..6533fe4 Binary files /dev/null and b/CPP/Array/Array.exe differ diff --git a/CPP/Array/a.exe b/CPP/Array/a.exe new file mode 100644 index 0000000..20ad5f0 Binary files /dev/null and b/CPP/Array/a.exe differ