1. A,B,C 2. A,C,D 3. Access Mostly Uused Products by 50000+ Subscribers 4. B,C,D Correct Answer : Exp : Question is asking to read data for both location and course_duration which always appears in nd line. So we can use line position control for that. In option @2 is used which is not correct line control syntax we can rule it out. Now remaining all three are correct.
Question : You have been given below dataset
Which of the following program can read data correctly?
Correct Answer : Get Lastest Questions and Answer : Explanation: We need to check which has correct syntax and correct use of #n and / sign. In option 1 we have used just / , it means data is proper order. But when you look that is not the case, course_id is at line 4 and we are trying to read it from line 1, so option 1 is out. Next option 2 we have used #n absolute line position, again course_id at line 4 and we are using it as a #1 this is not correct, however you can read course_name value to course_id variable technically syntax wise nothing wrong, but as soon as you start reading line 4 for two variables course_name training_date than it will fail saying only 1 variable on line 4. Hence, option 2 is wrong. Option C is wrong because we have used forward line control in first line and then again used the absolute line position to line 1 , this is not the correct syntax, hence it is out. Now you can validate option 4 which is correct syntax as well reading the values as per need.
Question : Which of the following read correctly course_name, corse_date, location, duration , course_fee and institute in this order
Correct Answer : Get Lastest Questions and Answer : Explanation: As you can see we to read data in sequence. We can use either #n or / forward line control. Option 4 is out. Option 3 uses semicolon after each forward slash which is not correct hence option 3 is out. In option 2 we have wrongly used both #n and / and hence out. Only option 1 is correct which correctly uses the forward slash to move next line.
Question : You need to write a do loop which counts upto but in each iteration step should be incremented by value .
Correct Answer : Get Lastest Questions and Answer : Explanation: Correct syntax to increment a counter by 10 is given using by statement and it must be defined where to start using hecounter=1 and end can be defined using to. Hence, option 1 is only correct.