

{"id":123309,"date":"2024-02-19T18:00:56","date_gmt":"2024-02-19T12:30:56","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=123309"},"modified":"2024-02-19T18:17:25","modified_gmt":"2024-02-19T12:47:25","slug":"how-to-write-read-data-from-file-in-c","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/","title":{"rendered":"How to Write and Read Data from File in C"},"content":{"rendered":"<h2>File Handling in C<\/h2>\n<p>File handling is an essential concept in C programming. It allows preserving data even after the program execution is over. This makes it simple to efficiently store and access vast volumes of data. File handling gives C programs a lot of power and flexibility.<\/p>\n<h3>Why Files are Needed<\/h3>\n<p><strong>Using files instead of variables has many advantages:<\/strong><\/p>\n<ul>\n<li>Files allow storing persistent data that can be accessed later. Variable values are lost when the program terminates.<\/li>\n<li>Files provide efficient access to large amounts of data. It is tedious to declare hundreds of variables.<\/li>\n<li>Data in files can be easily shared between programs. Just read the common file.<\/li>\n<li>Files allow easy data backup and transfer between systems. Just copy or move the file.<\/li>\n<\/ul>\n<p>Overall, using files instead of variables to store data saves time and effort when working with large data sets.<\/p>\n<h3>Types of Files in C<\/h3>\n<p><strong>In C, there are primarily two sorts of files:<\/strong><\/p>\n<h4>1. Text Files<\/h4>\n<p>Text files contain data in ASCII text form. They have extensions like .txt, .c, .cpp, etc.<\/p>\n<p><strong>Key features:<\/strong><\/p>\n<ul>\n<li>Using a text editor is simple to develop and modify.<\/li>\n<li>Human-readable.<\/li>\n<li>Requires less storage space compared to binary files.<\/li>\n<li>Not very secure as the contents are visible.<\/li>\n<\/ul>\n<h4>2. Binary Files<\/h4>\n<p>Binary files contain data in binary form (1s and 0s). They have extensions like .docx, .jpeg, .exe, etc.<\/p>\n<p><strong>Key features:<\/strong><\/p>\n<ul>\n<li>Store data more compactly than text files.<\/li>\n<li>Provide better security as the contents are not directly visible.<\/li>\n<li>Capable of storing large data like multimedia.<\/li>\n<li>Require specific programs to read and modify.<\/li>\n<\/ul>\n<h3>File Operations in C<\/h3>\n<p><strong>Let&#8217;s look at the common file operations in C:<\/strong><\/p>\n<h4>1. Creating a New File<\/h4>\n<p>The fopen() function can be used to create a new file.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">FILE *fp;\r\nfp = fopen(\"data.txt\",\"w\"); \/\/create data.txt file in write mode<\/pre>\n<p>The first parameter is the filename, and the second parameter is the mode &#8220;w&#8221; for write.<\/p>\n<h4>2. Opening an Existing File<\/h4>\n<p><strong>To open an existing file, specify the filename and appropriate mode while calling fopen():<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">FILE *fp;\r\n\r\n\/\/open text.txt in read mode\r\nfp = fopen(\"text.txt\",\"r\");\r\n\r\n\/\/open image.jpeg in binary write mode \r\nfp = fopen(\"image.jpeg\",\"wb\");<\/pre>\n<h4>3. Closing a File<\/h4>\n<p><strong>Always close opened files using fclose(fp) when done. This frees up resources and prevents data corruption:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">fclose(fp); \/\/close file pointed by fp<\/pre>\n<h4>4. Writing to a File<\/h4>\n<p><strong>1. Writing to a Text File<\/strong><\/p>\n<p>To write to a text file, we can use functions like fprintf(), fputc(), etc.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n\r\n  FILE *fpointer = fopen(\"data.txt\",\"w\");\r\n  \r\n  fprintf(fpointer, \"This is some text\\n\");\r\n  fprintf(fpointer, \"Written to a file\\n\");\r\n  \r\n  fclose(fpointer);\r\n  \r\n  return 0;\r\n}<\/pre>\n<p>This writes the given text to data.txt.<\/p>\n<p><strong>We can also write individual characters using fputc():<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">fputc('A', fpointer); \/\/writes character 'A' to file<\/pre>\n<p><strong>Always check the return value from writing functions to catch errors:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">if(fprintf(fpointer, text) &lt; 0) {\r\n   \/\/error occurred\r\n   printf(\"Unable to write to file\");\r\n}<\/pre>\n<p><strong>2. Writing to a Binary File<\/strong><\/p>\n<p>For binary files, we use the fwrite() function.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nstruct Record {\r\n  char name[30];\r\n  int age;\r\n  float salary;\r\n};\r\n\r\nint main() {\r\n\r\n  struct Record r1 = {\"John\", 30, 4000};\r\n  \r\n  FILE *fp = fopen(\"data.bin\",\"wb\");\r\n  \r\n  fwrite(&amp;r1, sizeof(struct Record), 1, fp);\r\n  \r\n  fclose(fp);\r\n\r\n  return 0;\r\n}<\/pre>\n<p>This writes the struct to the binary file data.bin.<\/p>\n<p>We can write multiple structs like this in a loop.<\/p>\n<h4>5. Reading from a File<\/h4>\n<p><strong>1. Reading from a Text File<\/strong><\/p>\n<p>To read from a text file, use fscanf(), fgetc() and related functions.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n\r\n  char str[100];\r\n  int num;\r\n  \r\n  FILE *fptr = fopen(\"text.txt\",\"r\");\r\n  \r\n  if(fptr == NULL) {\r\n    printf(\"Error opening file\"); \r\n    return 1;\r\n  }\r\n  \r\n  \/\/read string from file\r\n  fscanf(fptr,\"%s\", str); \r\n  \r\n  \/\/read integer\r\n  fscanf(fptr, \"%d\", &amp;num);  \r\n\r\n  printf(\"String is: %s\\n\", str);\r\n  printf(\"Integer is: %d\", num);\r\n  \r\n  fclose(fptr);\r\n\r\n  return 0;\r\n}<\/pre>\n<p>This reads a string and integer from the text file text.txt.<\/p>\n<p>We can also read individual characters using fgetc(fptr).<\/p>\n<p><strong>Always check for end of file (EOF) condition to avoid errors while reading:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">while(!feof(fptr)) {\r\n  \/\/keep reading from file\r\n}<\/pre>\n<p><strong>2. Reading from a Binary File<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nstruct Record {\r\n  char name[30];\r\n  int age;\r\n  float salary;\r\n};\r\n\r\nint main() {\r\n\r\n  struct Record r;\r\n  \r\n  FILE *fp = fopen(\"data.bin\",\"rb\");\r\n  \r\n  if(fp == NULL) {\r\n    printf(\"Error opening file\");\r\n    return 1;\r\n  }\r\n\r\n  \/\/read struct from file\r\n  fread(&amp;r, sizeof(struct Record), 1, fp);\r\n\r\n  printf(\"Name: %s\\n\", r.name);  \r\n  printf(\"Age: %d\\n\", r.age);\r\n  printf(\"Salary: %f\", r.salary);\r\n\r\n  fclose(fp);\r\n  \r\n  return 0;\r\n}<\/pre>\n<p>This reads the struct from binary file data.bin into r.<\/p>\n<h3>Opening Modes in Standard I\/O<\/h3>\n<table>\n<tbody>\n<tr>\n<td><b>Opening Mode<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>If File Does Not Exist<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">r<\/span><\/td>\n<td><span style=\"font-weight: 400\">Open for reading only.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Returns NULL.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">rb<\/span><\/td>\n<td><span style=\"font-weight: 400\">Open for reading only in binary mode.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Returns NULL.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">w<\/span><\/td>\n<td><span style=\"font-weight: 400\">Open for writing only. Overwrites existing content.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Creates new file.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">wb<\/span><\/td>\n<td><span style=\"font-weight: 400\">Open for writing only in binary mode. Overwrites existing content.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Creates new file.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">a<\/span><\/td>\n<td><span style=\"font-weight: 400\">Open for appending only. Data is added to the end of file.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Creates new file.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">ab<\/span><\/td>\n<td><span style=\"font-weight: 400\">Open for appending only in binary mode. Data added to end of file.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Creates new file.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">r+<\/span><\/td>\n<td><span style=\"font-weight: 400\">Open for both reading and writing.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Returns NULL.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">rb+<\/span><\/td>\n<td><span style=\"font-weight: 400\">Open for both reading and writing in binary mode.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Returns NULL.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">w+<\/span><\/td>\n<td><span style=\"font-weight: 400\">Open for reading and writing. Overwrites existing content.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Creates new file.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">wb+<\/span><\/td>\n<td><span style=\"font-weight: 400\">Open for reading and writing in binary mode. Overwrites existing content.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Creates new file.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">a+<\/span><\/td>\n<td><span style=\"font-weight: 400\">Open for reading and appending.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Creates new file.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">ab+<\/span><\/td>\n<td><span style=\"font-weight: 400\">Open for reading and appending in binary mode.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Creates new file.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Handling Errors and Exceptions in C<\/h3>\n<p><strong>Some common file operation errors:<\/strong><\/p>\n<ul>\n<li>File open failure<\/li>\n<li>File read\/write failure<\/li>\n<li>Trying to read at EOF<\/li>\n<li>File not found<\/li>\n<li>Access violations<\/li>\n<\/ul>\n<p><strong>Ways to handle errors:<\/strong><\/p>\n<ul>\n<li>Check return values from file functions like fopen(), fread() etc.<\/li>\n<li>Use perror() to print the error message for the last error that occurred.<\/li>\n<li>Check for EOF using feof() while reading.<\/li>\n<li>Use descriptive error messages and clean up resources properly.<\/li>\n<\/ul>\n<h3>Advanced File Operations<\/h3>\n<h4>1. Using fseek() for Positioning<\/h4>\n<p><strong>The fseek() function allows moving the file position indicator to a desired location:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">fseek(fptr, offset, fromwhere);<\/pre>\n<p><strong>The offset is number of bytes. fromwhere can be:<\/strong><\/p>\n<ul>\n<li>SEEK_SET &#8211; start of file<\/li>\n<li>SEEK_CUR &#8211; current position<\/li>\n<li>SEEK_END &#8211; end of file<\/li>\n<\/ul>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nstruct Record {\r\n  int id;\r\n  \/\/other fields\r\n};\r\n\r\nint main() {\r\n\r\n  struct Record r;\r\n\r\n  FILE *fp = fopen(\"records.bin\",\"rb\");\r\n  \r\n  \/\/move pointer to end\r\n  fseek(fp, 0, SEEK_END); \r\n  \r\n  \/\/read last record\r\n  fseek(fp, -sizeof(struct Record), SEEK_CUR);\r\n  fread(&amp;r, sizeof(struct Record), 1, fp);\r\n\r\n  \/\/print last record's id\r\n  printf(\"Last ID: %d\", r.id);\r\n  \r\n  fclose(fp);\r\n\r\n  return 0;\r\n}<\/pre>\n<p>This reads the last record in reverse order from a binary file.<\/p>\n<h3>Best Practices and Tips<\/h3>\n<p><strong>Some tips for efficient file handling:<\/strong><\/p>\n<ul>\n<li>Always check if the file opening was successful before further operations.<\/li>\n<li>Use relative paths instead of absolute file paths for portability.<\/li>\n<li>Close all opened files using fclose() before program termination.<\/li>\n<li>Use binary mode for non-textual data for performance.<\/li>\n<li>Handle errors and exceptions properly for robustness.<\/li>\n<li>Use fseek() and ftell() for random file access.<\/li>\n<\/ul>\n<h3>Conclusion<\/h3>\n<p>File handling allows storing persistent data for later use, leading to efficient and robust C programs. The key concepts include opening, closing, reading and writing files in different modes. By following best practices and error handling, we can build powerful applications using file handling in C.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>File Handling in C File handling is an essential concept in C programming. It allows preserving data even after the program execution is over. This makes it simple to efficiently store and access vast&#46;&#46;&#46;<\/p>\n","protected":false},"author":86671,"featured_media":123905,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19488],"tags":[29967,23914,29133,2263,29966,23948,29965],"class_list":["post-123309","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-programming","tag-c-file-handling","tag-c-programming","tag-c-tutorials","tag-c","tag-file-handling","tag-file-handling-in-c","tag-how-to-read-and-write-data-from-file-in-c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Write and Read Data from File in C - DataFlair<\/title>\n<meta name=\"description\" content=\"The key concepts of file handling in C include opening, closing, reading and writing files in different modes.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Write and Read Data from File in C - DataFlair\" \/>\n<meta property=\"og:description\" content=\"The key concepts of file handling in C include opening, closing, reading and writing files in different modes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-19T12:30:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-19T12:47:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/how-to-write-and-read-data-from-file-in-c.webp\" \/>\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\/webp\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\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":"How to Write and Read Data from File in C - DataFlair","description":"The key concepts of file handling in C include opening, closing, reading and writing files in different modes.","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:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/","og_locale":"en_US","og_type":"article","og_title":"How to Write and Read Data from File in C - DataFlair","og_description":"The key concepts of file handling in C include opening, closing, reading and writing files in different modes.","og_url":"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2024-02-19T12:30:56+00:00","article_modified_time":"2024-02-19T12:47:25+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/how-to-write-and-read-data-from-file-in-c.webp","type":"image\/webp"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/0e594f928e31fc96628ac40f6ae74f49"},"headline":"How to Write and Read Data from File in C","datePublished":"2024-02-19T12:30:56+00:00","dateModified":"2024-02-19T12:47:25+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/"},"wordCount":905,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/how-to-write-and-read-data-from-file-in-c.webp","keywords":["c file handling","c programming","c tutorials","C++","file handling","File Handling in C","how to read and write data from file in c"],"articleSection":["C Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/","url":"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/","name":"How to Write and Read Data from File in C - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/how-to-write-and-read-data-from-file-in-c.webp","datePublished":"2024-02-19T12:30:56+00:00","dateModified":"2024-02-19T12:47:25+00:00","description":"The key concepts of file handling in C include opening, closing, reading and writing files in different modes.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/how-to-write-and-read-data-from-file-in-c.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/how-to-write-and-read-data-from-file-in-c.webp","width":1200,"height":628,"caption":"how to write and read data from file in c"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/how-to-write-read-data-from-file-in-c\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"C Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/c-programming\/"},{"@type":"ListItem","position":3,"name":"How to Write and Read Data from File in C"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/0e594f928e31fc96628ac40f6ae74f49","name":"TechVidvan Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c89190da3d4010c71ba476b618ab10fdc2335c82cdfa0ad5002d98d0f2473444?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c89190da3d4010c71ba476b618ab10fdc2335c82cdfa0ad5002d98d0f2473444?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c89190da3d4010c71ba476b618ab10fdc2335c82cdfa0ad5002d98d0f2473444?s=96&d=mm&r=g","caption":"TechVidvan Team"},"description":"TechVidvan Team provides high-quality content &amp; courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.","url":"https:\/\/data-flair.training\/blogs\/author\/test001\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/123309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/86671"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=123309"}],"version-history":[{"count":4,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/123309\/revisions"}],"predecessor-version":[{"id":131836,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/123309\/revisions\/131836"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/123905"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=123309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=123309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=123309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}