Thursday 31 August 2017

TOO MANY TYPES IN DECLARATION - ERRORS IN C PROGRAMMING

TOO MANY TYPES IN DECLARATION - ERROR IN C PROGRAMMING 

Compile Time Error

Too many types in declaration is a common error that occurs when we try to declare a function or variable of multiple types that is not allowed in C programming .As for example
int char a;
then this statement results in this type of error and exactly this situation is happening with the program in the above image. Here compiler gets confused that what is the exact data type of a;

In the above program in image, structure is defined that is a user defined data type thats why the compiler is condensed about the return type of main() function.Compiler is considering the structure as a data type so there are two data types there the first one is int and the second one is structure.And this ambiguity results in this error. And the second error is also explaining the same thing that incompatible types. So,when we put a semicolon before int and after the structure definition the error will be gone.
I hope you enjoyed this post...stay connected I will be posting  such interesting posts.

Other posts:
 how to insert image in C/C++ language
Introduction to Errors in C programming
C program for Bisection method

How to implement Facebook audience network banner ad in android app using Android Studio

Its very simple to implement Facebook audience network banner ad in android app using Android Studio. We will complete it in 4 Steps. 1. ...