Computer Science, asked by geetu22chauhan, 1 month ago

#include<stdio.h>
#include<conio.h>
void main();
{
int 12 val= 10
printf("%d", val12);
getch();
}
find the error in the given C program ​

Answers

Answered by vaishnavichaurasia89
1

Answer:

According to your question, the name of the method cannot end with semicolon (;).

Explanation:

Error -

#include<stdio.h>

#include<conio.h>

void main();   // Semicolon must be removed

{

int 12 val= 10  // variable name must be val12

printf("%d", val12);

getch();

}

Correction -

#include<stdio.h>

#include<conio.h>

void main()

{

int val12 = 10;

printf("%d", val12);

getch();

}

Similar questions