C Write Program Prompts File Name Reads File Check Balanced Curly Braces Parentheses Squar Q37179911

C++ Write a program that prompts for a file name and then readsthe file to check for balanced curly braces, {; parentheses, ();and square brackets, []. Use a stack to store the most recentunmatched left symbol. The program should ignore any character thatis not a parenthesis, curly brace, or square bracket. Note thatproper nesting is required. For instance, [a(b]c) is invalid.Display the line number the error occurred on.

These are a few of the files that will be called, each namedinput1.cpp , input2.cpp and so on until input6.cpp –

input1.cpp

#include <iostream>

using namespace std;

void main (void)
{
   cout << “Hello World!” << endl;

}

input2.cpp

#include <iostream>

using

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.