Question: C + + Write a logical statement comparing char variables. Assignment: While writing a program for a PCC , a company with a focus on
C
Write a logical statement comparing char variables.
Assignment: While writing a program for a PCC a company with a focus on retrieving and analyzing statistics, you are being asked to load data from a file with a csv extension.
CSV files or Comma Separated Values use special characters like commas, newlines, or even tabulation characters as separators between data columns or rows. As part of your script, you need to validate the extension of the file and detect when one of these characters has been used.
Assume the string variable dataExt contains the file extension and the char variable dataChar contains a character that has been read from the file. Write a statement that evaluates to true if the extension is csv and a comma, a newline, or a tab has been read from the file. Assign the result to the variable result.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
