All that means is that you don't have any syntax errors, errors in the way you have used C. The compiler can find these easily. You probably have semantic errors, which cause the program to produce incorrect results.

This is not helpful at all. Provide details about what the program produced as output.

The biggest problem I see right away is that you are initializing array variables before you actually declare them. In the following code snippets you are initializing some fields of the dept and nation array.

Code ( (Unknown Language)):

dept[0].Dcode=123;

dept[0].Name="EE";

Code ( (Unknown Language)):

nation[0].Ncode=321;

nation[0].Name="uae";

Later on, in main(), you get around to the declarations of the dept and nation arrays.

Code ( (Unknown Language)):

int main ()

{

int i,j,k;

per_info personal[1];

dept_info dept[1];

nation_info nation[1];

Also, I should point out that you cannot assign a string constant to a character array variable, as you're attempting to do here

Code ( (Unknown Language)):

dept[0].Name="EE";

and in the person array. The assignment actually occurs, but what gets stored is the address of the string constant, not the string of characters. To assign a string value to an array variable, you need to use a string function such as strcpy().

Another thing to check is that each call to scanf has a control string that matches the types you are inputting to. Here's one that needs work.

You have four conversion specifiers (e.g., %d, %c), but only three variables to the right of the control string. With three variables, you need to have three conversion specifiers. Also, the conversion specifiers for character array variables should be %s, not %c (you have %*c).

Same problem in the call to scanf to get the joining date.

If you don't understand how to use scanf very well, it would be better to input to one variable at a time, instead of trying to input to three of them in a single scanf call.

Judging by something you said later in your post, you actually want to do output here, not input. If that's the case, you need to use printf, not scanf. As I said before your control string should have the same number of conversion specifiers (the %d, %c things) as variables.