 Hello friends. I am Sanjay Gupta. In this video, I am going to demonstrate you the solution of this problem where you have to read ID, name and salary of 10 employees and you have to print information of a particular employee based on ID. So here you have to apply linear search operation on area of structure in C programming. So before implementing solution of this problem, you can note how you can search my YouTube channel. You can type my name Sanjay Gupta in YouTube search. My channel will be available there. You can watch various programming related videos here. Now I am going to implement solution of this problem. So first time including a header file. Then I have to declare structure. So structure name is EMP that represents employee. Then ID of integer type. Then second member is name, which is of character array and then float salary. So this way I have declared EMP employee structure. Now I am going to define main function. Inside main function, I have to declare an area of structure. So this way I have created area of structure. Here variable is E whose size is 10. Its data type is struct EMP. So it can store information of 10 employees together. For processing of loop, I have declared variable I. Now I am going to implement a for loop which will repeat 10 times. So inside this for loop, I am going to print the message enter percent D employee ID, name and salary. And for percent D, I am going to print value of I plus one. So initially I is zero. So it will print one here. Enter first employee ID, name and salary. Then I will be incremented to one. So one plus one two. So it will display enter second employee ID, name and salary. So this way all the information will be received from user through this print F and it will be followed by scan of statements. So these scanner statement will be reading actual information. So here I have to write E of I dot ID. So this will read ID from user. Then get is E of I dot name and then again scan of percent F E of I dot salary. So this way ID name and salary will be received from user. Now if you are reading mixed kind of information, then you have to clear the buffer by calling this F flush function. So it is having an argument that is STD in standard input. So we have to clear standard input. So that's why I am calling this F flush function. So before calling any reading function like scan F and get us, you have to call F flush and you have to pass STD IN standard input argument inside it. So this is proper way to read mixed kind of information through a follow. Now after reading this information, I have to read a particular ID whose information I have to print. So for that purpose, I am declaring one more variable that is N. Now through print F, the message enter ID whose details you want to print. So this way I have to receive the particular ID which I want to search in area of structure. Now I am implementing another loop which is responsible for searching that particular ID. So here statement is E of I dot ID double equals to N. So if this condition is true, if E of I dot ID is equals to N, it means N is available in area of structure. So here I can print all the information of employee. So employee ID equals to percent E of I dot ID then print F slash N employee name equals to percent S then E of I dot name and third print F employee salary equals to percent F E of I dot salary. So this way all the required information will be displayed on output screen. Now if N is available in area of structure and IDs are unique. So if this if condition is true and all the informations are displayed on output screen, then I can break the loop so that unnecessarily this loop will not rotate. So if this line number 28 condition is true, then all these information ID name and salary will be displayed and loop will be terminated through this break keyword. Otherwise loop will repeat 10 times. After completion of this loop, I am writing return zero. So this is the complete implementation of the program. Now I have to execute this code so that you can understand how it will work. So you can see it is asking for first EMP ID name and salary. So I am entering ID one name A and salary 10,000. Sorry, it is having an issue. Sorry, I have forgot to write M percent here. So scan F requires M percent sign so that value can be stored at a particular address. Now again, I am going to execute this code. So I am entering this information. Now it is reading the information successfully. So you can see I am entering different kind of information. Seventh employer detail I have entered. Now for eighth, I have entered the details now for nine and at last 10. So this way I have entered all the details of 10 employees. Now it is asking for the ID whose detail I want to print. So I am entering ID five. So you can see it is showing the details of employee whose ID is five. So employee ID is five, name is E and salary is 5000. So this way only that employee detail is printed whose ID I have entered as five. So this way I have implemented linear search operation on area of structure and this structure is based on employee data. So this way I have implemented solution of the problem which is available at the beginning of this program that is read ID name and salary of 10 employees and print information of a particular employee based on ID. I hope you have understood how I have implemented this code in front of you. If you want to watch more programming related videos, you can search my name Sanjay Gupta in YouTube. My channel will be available there. You can watch various programming related videos there. Thank you for watching this video.