Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7028093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:20:26+00:00 2026-05-28T00:20:26+00:00

i have the following errors – please help me to find the error: 9

  • 0

i have the following errors – please help me to find the error:

9   IntelliSense: expected a '}'        70  4   

it points on the end of the code – but there are no open { anywhere!! so why??

8   IntelliSense: expected a ';'        57  1   

it points on the { after the void main but why to put ; after the { of the void main??

Error   7   error C1075: end of file found before the left brace '{' at     70  1

points to the beginig of the code – why???

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

void merge(int *a,int p,int q,int r)
{
  int i=p,j=q+1,k=0;
  int* temp=(int*)calloc(r-p+1, sizeof(int));
  while ((i<=q)&& (j<=r))
        if(a[i]<a[j])
                    temp[k++]=a[i++];
        else 
                    temp[k++]=a[j++];
  while(j<=r)   // if( i>q )
    temp[k++]=a[j++];
 while(i<=q)   //  j>r 
    temp[k++]=a[i++];

  for(i=p,k=0;i<=r;i++,k++)   //  copy temp[] to a[]   
            a[i]=temp[k];
  free(temp);
}

void merge_sort(int *a,int first, int last)
{
     int middle;
            if(first < last)
           {
                middle=(first+last)/2;
                merge_sort(a,first,middle);
                merge_sort(a,middle+1,last);
                merge(a,first,middle,last);
           {
}

void main()
{

    int a[] = {9, 7, 2, 3, 5, 4, 1, 8, 6, 10};
    int i;

    merge_sort(a, 0, 9);

    for (i = 0; i < 10; i++)
        printf ("%d ", a[i]);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:20:27+00:00Added an answer on May 28, 2026 at 12:20 am

    You braces don’t match here.

    if(first < last)
     {
          middle=(first+last)/2;
          merge_sort(a,first,middle);
          merge_sort(a,middle+1,last);
          merge(a,first,middle,last);
     {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code but I am getting the following compile errors: Attribute
I have the following code (changed object names, so syntax/spelling errors ignore). public class
I have the following code, which will not work. The javascript gives no errors
I have the following error when I try to compile my code in g+
I have the following code with the following errors and I am not sure
I have the following code that works on Linux but doesn't work on Windows(VS2008)
On several of my adsense running sites, I have been getting the following errors:
I have a large xml file (approx. 10 MB) in following simple structure: <Errors>
I have the following error Exception in thread main javax.naming.NameNotFoundException: CounterBean not bound trying
Hello I have the following error by git-fsck, which cannot be cleaned by git-gc

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.