A PHP Error was encountered

Severity: 8192

Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Filename: libraries/Filtered_db.php

Line Number: 23

Error: expected declaration or statement at end of input in C
Q:

Error: expected declaration or statement at end of input in C

0

Error: expected declaration or statement at end of input in C

The main cause of this error is – missing closing curly brace (}) of the main() block.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Example:

#include <stdio.h>

int main(void){
	printf("Hello world");
	return 0;

Output

prog.c: In function ‘main’:
prog.c:5:2: error: expected declaration or statement at end of input
  return 0;
  ^~~~~~

In this program, closing brace of the main() block is missing

How to fix?

To fix this and such errors, please take care of curly braces, they are properly opened and closed.

Correct code:

#include <stdio.h>

int main(void){
	printf("Hello world");
	return 0;
}

Output

Hello world

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now