Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please help .. it keeps on SAYING THE ERROR    |error: expected identifier or '(' before '{' token|

PLEASE DO CHANGE WHATEVER THE ERROR IS PLEASEEE

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>

int ch;
int e;

void Nestedlooping();
void Recursion();
void Array();
void FileHandling();
void Exit();

void main()
{
    printf("\n\n\t\t\t   oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\n");
    printf("\n\n\t\t\t   oo        \t\t   ALLEAH CPE112 Final Exam Menu Programs          oo");
    printf("\n\n\t\t\t   oo        \t\t    \n\nPress (1) for Nested Looping               oo");
    printf("\n\n\t\t\t   oo        \t\t     \nPress (2) for Recursion                     oo");
    printf("\n\n\t\t\t   oo        \t\t     \nPress (3) for Array                         oo");
    printf("\n\n\t\t\t   oo        \t\t     \nPress (4) for File Handling                 oo");
    printf("\n\n\t\t\t   oo        \t\t     \nPress (5) to Exit                           oo\n");
    printf("\n\n\t\t\t   oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\n");


    printf("\n\n\n-----------------------------------------------------------------------------------------------------------------------\n");
                printf("\n\n\n\n\n\t\t\t\t    Please input your chosen program:        \n\n\t\t\t\t\t\t\t");
                scanf("%d", &ch);

    switch (ch)
                {
                    case 1:
                            Nestedlooping();

                        break;


                    case 2:
                            Recursion();

                        break;


                    case 3:
                            Array();

                        break;

                    case 4:
                            FileHandling();

                        break;

                    case 5:
                            Exit();

                        break;

                    default:
                        printf("\n\t\t\tInvalid Option, Please Enter Right Option !\n");

                }
                }

void Nestedlooping();
{
    int n, i;
    char in;
    do
    {
        printf("Enter an integer: \n");
        scanf("%d", &n);
        if(n>=1 && n<=10)
        {
            for (i = 1; i <= 10; ++i)
            {
                printf("%d * %d = %d \n", n, i, n * i);
            }
        }
        else
        {
            printf("Number not in the range\n");
        }
        printf("\nPress y to continue and n to go back to menu?(y/n): \n");
        scanf(" %c", &in);

        getch();
        main();

    }
    while(in=='y');
}

void Recursion();
{
    int N;
    int option;

    while(2)
    {
        printf("Enter a number: ");
        scanf("%d", &N);

        //Call additionN recursive function and display
        //the return value as sum
        printf("Sum = %d", additionN(N));

        //Ask user if they want to continue
        printf("\nEnter 1 to continue: ");
        scanf("%d", &option);

        //if option is not 1 exit the program
        if(option != 1)
        {
            break;
        }
    }
    printf("\nExiting..");
    return 0;
}

void Array();
{
      char string[20];
         int n;
         int count=0;
        printf("Enter the no of characters present in an array \n ");
        scanf("%d", &n);

        printf(" Enter the string of %d characters \n" , n);
        scanf("%s", string);
        while (count < n)
        {
            printf(" %c = %d\n", string[count], string[count] );
            ++ count ;
        }
        char ars;

        printf("Press y to continue and n to go back to menu?(Y/N): ");
        scanf("%s",&ars);

        if(ars=='Y')
        {
        Array();
        }
        else
        {
            main();
        }
}

 

 

 

 

=== Build file: "no target" in "no project" (compiler: unknown) ===
error: expected identifier or '(' before '{' token
C:\Users\Albert Talim\Documents\CODES_Talim\TALIM_FINAL.c 83
C:\Users\Albert Talim\ Documents\CODES_Talim\TALIM_FINAL.c 119
C:\Users\Albert Talim\Documents\CODES_Talim\TALIM FINAL.c 153
error: expected identifier or
'(' before '{' token
error: expected identifier or '(' before '{' token
'' before '{' token
C:\Users\Albert Talim\Documents\CODES Talim\TALIM FINAL.c 190
error: expected identifier or
C:\Users\Albert Talim\Documents\CODES Talim\TALIM FINAL.c 284
error: expected identifier or '(' before '{' token
=== Build failed: 5 error (s), 0 warning (s)
(0 minute (s), 0 second (s))
===
Transcribed Image Text:=== Build file: "no target" in "no project" (compiler: unknown) === error: expected identifier or '(' before '{' token C:\Users\Albert Talim\Documents\CODES_Talim\TALIM_FINAL.c 83 C:\Users\Albert Talim\ Documents\CODES_Talim\TALIM_FINAL.c 119 C:\Users\Albert Talim\Documents\CODES_Talim\TALIM FINAL.c 153 error: expected identifier or '(' before '{' token error: expected identifier or '(' before '{' token '' before '{' token C:\Users\Albert Talim\Documents\CODES Talim\TALIM FINAL.c 190 error: expected identifier or C:\Users\Albert Talim\Documents\CODES Talim\TALIM FINAL.c 284 error: expected identifier or '(' before '{' token === Build failed: 5 error (s), 0 warning (s) (0 minute (s), 0 second (s)) ===
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY