Devam Ediyor

Stack Program

I need help defining what I am doing wrong in the following task and showing me a correct/working solution. I have created a "main.c" file with some code but something goes wrong with it.

Below is the definition of the task at hand:

"A program in C, which will identify the complex proposals within a text file that contains code in a language C. The program starts when you ask the user to enter the name of the file you wish to open. Then the program have to inform the startpoint that starts each complex sentence (ie

an open brace '{') and endpoint of the specific complex proposal (ie a closed bracket '}').

------------Example 1:

File with name “test1.c” with code:

#include

int main ()

{

int i;

for (i=0;i<10;i++)

{

printf("%d\n",i);

}}

----------------------------------------

Program Output:

Give name of file: test1.c

1st complex sentence:

Opens at line 3

Closes at line 9

2nd complex sentence:

Opens at line 6

Closes at line 8

----------------------------------------------------

The program should work correctly even if there are multiple hooks in the same row.

---------------Example 2:

File with name “test2.c” with code:

#include

int main ()

{

int i;

for (i=0;i<10;i++)

{{

printf("%d\n",i);

}

}}

--------------------------------------------------

Program Output:

Give name of file: test2.c

1st complex sentence:

Opens at line 3

Closes at line 9 (brackets 2)

2nd complex sentence:

Opens at line 6 (brackets 1)

Closes at line 9 (brackets 1)

3rd complex sentence:

Opens at line 6 (brackets 2)

Closes at line 8

Beceriler: C Programlama

Daha fazlasını görün: stack programming, program proposal example, programming language definition, programming definition, printf programming, int i, example program proposal, definition programming language, definition programming, programming printf, language program example, program output, atm program stack, output proposals, program hand, stack program, stack line, flight program stack, flight destination program stack, definition sentence, help program created, output definition, bracket program, program output text, stack code

İşveren Hakkında:
( 23 değerlendirme ) Imerovigli, Greece

Proje NO: #4452701

Seçilen:

vano101

Hello. I'm C/C++ expert. Looks pretty easy for me

1 gün içinde 34$ USD
(218 Değerlendirme)
5.8

3 freelancer bu iş için ortalamada 42$ teklif veriyor

dobreiiita

Hi, I can help you in very short time.

1 gün içinde 58$ USD
(41 Değerlendirme)
5.1
diamond1027

Hi, I am a expert. I can start just now. Regards.

1 gün içinde 54$ USD
(1 Değerlendirme)
1.8
SoftwareEng8876

Please have a look to PM. Thanks

1 gün içinde 71$ USD
(0 Değerlendirme)
0.0
shaz123

Hi ===YESS!! WE ARE EXPERT IN WEB DEVELOPING, HTML, XHTML, CSS, JAVASCRIPT, JQUERRY, PHP, SEO, ECOMMERCE, WORDPRESS, JOOMLA, AJAX, DRUPAL,MAGENT,O XML, ANDROID APP,IPAD APP,IPHONE APP. , WE LOVE TO DEVELOP AND DESIGN== Daha fazlası

in 3 gün içinde34$ USD
(0 Değerlendirme)
0.0