{"id":81403,"date":"2021-07-05T09:00:01","date_gmt":"2021-07-05T03:30:01","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=81403"},"modified":"2021-07-05T09:00:01","modified_gmt":"2021-07-05T03:30:01","slug":"arrays-in-cpp","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/","title":{"rendered":"Arrays in C++"},"content":{"rendered":"<p>In this article, we will be learning how to work with arrays in C++. An array is a set of values of the same data type stored in contiguous memory locations.<\/p>\n<p>Let\u2019s suppose we need to store 10 values of int type, instead of declaring 10 different variables, we can declare an int array of size 10.<\/p>\n<h3>C++ Array Declaration and Initialization<\/h3>\n<p><strong>Syntax:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">datatype arrayname[size];<\/pre>\n<p>For example, we can declare an array named arr that can store 10 elements of int data type as:<br \/>\nint arr[10];<\/p>\n<p>We can initialize an array while declaring it.<\/p>\n<p>Array declaration and initialization can be done in following ways:<\/p>\n<p><strong>1. Specifying size<\/strong><\/p>\n<p>int arr[5] = {5,2,6,9,12};<\/p>\n<p><span style=\"font-weight: 400\">arr[0]<\/span> <span style=\"font-weight: 400\">\u00a0 \u00a0 arr[1]<\/span>\u00a0 \u00a0 <span style=\"font-weight: 400\">arr[2]<\/span> <span style=\"font-weight: 400\">\u00a0 arr[3]<\/span> <span style=\"font-weight: 400\">\u00a0 arr[4]<\/span><\/p>\n<table style=\"height: 49px\" width=\"298\">\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400\">5<\/span><\/td>\n<td><span style=\"font-weight: 400\">2<\/span><\/td>\n<td><span style=\"font-weight: 400\">6<\/span><\/td>\n<td><span style=\"font-weight: 400\">9<\/span><\/td>\n<td><span style=\"font-weight: 400\">12<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01<\/span> <span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a02<\/span> <span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 3<\/span> <span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a04<\/span><\/p>\n<p><strong>2. Without specifying size<\/strong><\/p>\n<p>int arr[] = {5,2,6,9,12};<\/p>\n<p>This will also result in the same array as shown above.<\/p>\n<p><strong>3. Initializing fewer elements than specified size<\/strong><\/p>\n<p>In this case, remaining elements store the default value (for fundamental data types, it is 0).<\/p>\n<p>int arr[5] = {5,2,6};<\/p>\n<p><span style=\"font-weight: 400\">arr[0]<\/span> <span style=\"font-weight: 400\"> \u00a0 \u00a0 \u00a0 arr[1]<\/span> <span style=\"font-weight: 400\"> arr[2]<\/span> <span style=\"font-weight: 400\"> \u00a0 \u00a0 \u00a0 arr[3]<\/span> <span style=\"font-weight: 400\">\u00a0 arr[4]<\/span><\/p>\n<table style=\"height: 5px\" width=\"326\">\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400\">5<\/span><\/td>\n<td><span style=\"font-weight: 400\">2<\/span><\/td>\n<td><span style=\"font-weight: 400\">6<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1<\/span> <span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a02<\/span> <span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a03<\/span> <span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a04<\/span><\/p>\n<p><strong>4. No value in initializer<\/strong><\/p>\n<p>int arr[5] = { };<\/p>\n<p>This will result in an array arr of size 5 whose each element initially contains zero.<\/p>\n<p><span style=\"font-weight: 400\">arr[0]<\/span> <span style=\"font-weight: 400\"> \u00a0 \u00a0 \u00a0 arr[1]<\/span>\u00a0 \u00a0 \u00a0<span style=\"font-weight: 400\">arr[2]<\/span> <span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0arr[3]<\/span> <span style=\"font-weight: 400\">\u00a0 arr[4]<\/span><\/p>\n<table style=\"height: 56px\" width=\"301\">\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<td><span style=\"font-weight: 400\">0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01<\/span> <span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 2<\/span> <span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 3<\/span> <span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 4<\/span><\/p>\n<p><strong>Data Type<\/strong><br \/>\nAn array in C++ can contain elements of any data type including int, float, double, char, etc. except void.<\/p>\n<h3>Accessing Array Elements in C++<\/h3>\n<p>We can access an array element using its index. Index of an array starts from 0 and ends at (size-1).<br \/>\n<strong>Syntax<\/strong>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">arrayname [index];<\/pre>\n<p><strong>Example of accessing array elements in C++<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/program to change value of an array element\n#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n  int arr[5] = {3,7,10,9,14};\n  \n  \/\/changing value of 3rd element\n  arr[2] = 11;\n  \n  \/\/Displaying third value\n  cout&lt;&lt;arr[2];\n  \n  return 0;\n}\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">11<\/div>\n<p><strong>Example to store user inputs in an array and display array elements<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n  int arr[5];\n  \n  \/\/Taking inputs from user and storing in arr\n  cout&lt;&lt;\"Enter 5 values\"&lt;&lt;endl;\n  for(int i=0; i&lt;5; i++)\t{\n      cin&gt;&gt;arr[i];\n  }\n  \n  \/\/Displaying array elements\n  for(int i=0; i&lt;5; i++)\t{\n      cout&lt;&lt;arr[i]&lt;&lt;\" \";\n  }\n  return 0;\n}\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">Enter 5 values<br \/>\n1<br \/>\n3<br \/>\n5<br \/>\n6<br \/>\n2<br \/>\n1 3 5 6 2<\/div>\n<h3>Multidimensional Arrays in C++<\/h3>\n<p>Multidimensional array can also be referred to as an array of arrays.<\/p>\n<p>We can think of a 2-Dimensional array as a table of elements of the same data type. Let us declare a 2-D array for better understanding.<\/p>\n<p>int x[3][4];<\/p>\n<p>This array contains 12 elements (as 3 * 4 = 12) of int data type. It can be thought of as a table having 3 rows and 4 columns, where each row is an array of 4 elements in itself.<\/p>\n<p><strong>Example to initialize a 2-D array and access its element<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n    \t\/\/Initializing\nint arr[2][4] = {{2,9,4,6}, {1,10,8,5}};\n  \/\/Displaying 3rd element of 1st row\n  cout&lt;&lt;arr[0][2];\n  \n  return 0;\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">4<\/div>\n<h3>Passing Array to a Function in C++<\/h3>\n<p>When we pass an array to a function in C++, the function treats it as a pointer. This means that the actual array is accessed from inside the function.<\/p>\n<p><strong>Example of passing array to a function<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;iostream&gt;\nusing namespace std;\n\nvoid display(int a[], int n) {\n    cout&lt;&lt;\"Elements of array are: \"&lt;&lt;endl;\n    for(int i=0; i&lt;n; i++) {\n        cout&lt;&lt;a[i]&lt;&lt;\" \";\n    }\n}\nint main() {\n  int arr[5] = {1, 2, 4, 8, 16};\n  unsigned int n = sizeof(arr)\/sizeof(arr[0]);     \/\/to get number of elements in array\n  display(arr, n);\n  \n  return 0;\n}\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">Elements of array are:<br \/>\n1 2 4 8 16<\/div>\n<p>In the above example, we have declared the formal parameter as an unsized array. This can also be declared as a pointer or a sized array.<\/p>\n<p><strong>For example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">void display(int *a, int n) {\n  \/\/statements\n}\nor\nvoid display(int a[5]) {\n  \/\/statements\n}\n<\/pre>\n<p>In each of these three ways, the result obtained will be the same, as each indicates an integer pointer to the compiler.<\/p>\n<h3>Pointer to an Array in C++<\/h3>\n<p>An array and its elements can be accessed using pointers.<\/p>\n<p><strong>Example of pointer to an array in C++<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n  int arr[3] = {2, 4, 8};\n  int *p;\n  p = arr;        \/\/pointer p points to 0th element\n  cout&lt;&lt;*p&lt;&lt;endl;\n  \n  \/\/To display all elements\n  for(int i=0; i&lt;3; i++) {\n      cout&lt;&lt;*(p+i)&lt;&lt;\" \";\n  }\n  \n  return 0;\n}\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">2<br \/>\n2 4 8<\/div>\n<p>In this example, pointer p points to the 0th element of the array. However, we can also declare a pointer that points to an entire array.<\/p>\n<p><strong>For example<\/strong><br \/>\nint (*ptr)[3];<\/p>\n<p>This pointer ptr points to an array of 3 integers.<\/p>\n<p><strong>Example to illustrate implementation of pointer pointing to an entire array<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n  int arr[3] = {2, 4, 8};\n  int (*p)[3];\n  p = &amp;arr;        \/\/pointer p points to entire array\n  for(int i=0; i&lt;3; i++) {\n      cout&lt;&lt;(*p)[i]&lt;&lt;endl;\n  }\n  \n  return 0;\n}\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">2<br \/>\n4<br \/>\n8<\/div>\n<h3>Advantages of Arrays in C++<\/h3>\n<p>Advantages of\u00a0 C++ arrays are:<\/p>\n<ul>\n<li>Requires less lines of code, because it enables us to create an array of numerous elements.<\/li>\n<li>Array indexes allow for random access to elements. Hence, elements are easily accessible.<\/li>\n<li>Traversing an array is simple.<\/li>\n<li>Sorting becomes simple.<\/li>\n<li>We can implement other data structures using arrays.<\/li>\n<li>2-D arrays represent matrices.<\/li>\n<\/ul>\n<h3>Disadvantages of arrays in C++<\/h3>\n<ul>\n<li>While declaring an array, its size is fixed. We cannot modify the size of an array.<\/li>\n<li>There is wastage of memory if we declare size more than required.<\/li>\n<li>Insertion and deletion become costly as elements are needed to be shifted accordingly.<\/li>\n<\/ul>\n<h3>Summary<\/h3>\n<p>We learnt about arrays in this article. An array is a set of values of the same data type stored in contiguous memory locations.<\/p>\n<p>Elements of an array can be accessed using index. We learnt how to declare an array, and initialize and access its elements in C++ with suitable examples. Then, we also discussed multidimensional arrays, followed by advantages and disadvantages of arrays.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will be learning how to work with arrays in C++. An array is a set of values of the same data type stored in contiguous memory locations. Let\u2019s suppose we&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":81701,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3405],"tags":[3677,3678,3632,3679,3680],"class_list":["post-81403","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpp","tag-advantages-of-arrays-in-c","tag-disadvantages-of-arrays-in-c","tag-multidimensional-arrays-in-c","tag-passing-array-to-a-function-in-c","tag-pointer-to-an-array-in-c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Arrays in C++ - TechVidvan<\/title>\n<meta name=\"description\" content=\"Learn about arrays in C++ with examples. An array is a set of values of the same data type stored in contiguous memory locations.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Arrays in C++ - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Learn about arrays in C++ with examples. An array is a set of values of the same data type stored in contiguous memory locations.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-05T03:30:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Arrays-in-C.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Arrays in C++ - TechVidvan","description":"Learn about arrays in C++ with examples. An array is a set of values of the same data type stored in contiguous memory locations.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/","og_locale":"en_US","og_type":"article","og_title":"Arrays in C++ - TechVidvan","og_description":"Learn about arrays in C++ with examples. An array is a set of values of the same data type stored in contiguous memory locations.","og_url":"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2021-07-05T03:30:01+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Arrays-in-C.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Arrays in C++","datePublished":"2021-07-05T03:30:01+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/"},"wordCount":680,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Arrays-in-C.jpg","keywords":["Advantages of Arrays in C++","Disadvantages of Arrays in C++","Multidimensional Arrays in C","Passing Array to a Function in C","Pointer to an Array in C++"],"articleSection":["C++ Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/","url":"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/","name":"Arrays in C++ - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Arrays-in-C.jpg","datePublished":"2021-07-05T03:30:01+00:00","description":"Learn about arrays in C++ with examples. An array is a set of values of the same data type stored in contiguous memory locations.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Arrays-in-C.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Arrays-in-C.jpg","width":1200,"height":628,"caption":"Arrays in C++"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/arrays-in-cpp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Arrays in C++"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/81403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=81403"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/81403\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/81701"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=81403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=81403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=81403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}