|
INTERVIEW QUESTIONS
MAINFRAME
JCL
DETAILS
Question: 11. main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }
Answer: Answer: Compiler Error : Type mismatch in redeclaration of function display Explanation : In third line, when the function display is encountered, the compiler doesn't know anything about the function display. It assumes the arguments and return types to be integers, (which is the default type). When it sees the actual function display, the arguments and type contradicts with what it has assumed previously. Hence a compile time error occurs.
|
|
|
Category |
JCL Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 7051 users |
Added on |
9/2/2014 |
Views |
70808 |
Rate it! |
|
|
Question:
11. main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }
Answer:
Answer: Compiler Error : Type mismatch in redeclaration of function display Explanation : In third line, when the function display is encountered, the compiler doesn't know anything about the function display. It assumes the arguments and return types to be integers, (which is the default type). When it sees the actual function display, the arguments and type contradicts with what it has assumed previously. Hence a compile time error occurs.
Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
10. main() { printf("%x",-1<<4); }
|
} - JCL Interview Questions & Answers">
View Answer
|
|
9. main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }
|
case 1: pri - JCL Interview Questions & Answers">
View Answer
|
|
8. main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
|
}
- JCL Interview Questions & Answers">
View Answer
|
|
7. main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }
|
View Answer
|
|
6. main() { extern int i; i=20; printf("%d",i); }
|
}
- JCL Interview Questions & Answers">
View Answer
|
|
5. main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
|
View Answer
|
|
4. main() { static int var = 5; printf("%d ",var--); if(var) main(); }
|
if(var) main(); } - JCL Interview Questions & Answers">
View Answer
|
|
3. main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
|
e - JCL Interview Questions & Answers">
View Answer
|
|
2. main() { char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("
%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); }
|
int i; for(i=0;s[ i ];i++) printf("
%c%c%c%c",s[ i ] - JCL Interview Questions & Answers">
View Answer
|
|
How many jobs can we write in a single file ?
|
View Answer
|
|
Can I have members of different record length in a single PDS?
|
View Answer
|
|
How you can delete a particular record from jcl? That is a file(PS) has 50 records, i need to delete the 5th record without any condition, how you will do it?
|
View Answer
|
|
What does the keyword DCB mean and what are some of the keywords associated with it?
|
View Answer
|
|
How is the keyword DUMMY used in JCL?
|
View Answer
|
|
What is the purpose and meaning of the TIME keyword and what JCL statement is it associated with?
|
View Answer
|
|
What is the purpose of the PARM keyword in the EXEC statement?
|
View Answer
|
|
What is the improvement to COND= in the latest version of MVS?
|
View Answer
|
|
What is the meaning of the EXEC statement keyword, COND? What is its syntax?
|
View Answer
|
|
How do you designate a comment in JCL?
|
View Answer
|
|
What is MOD and when would you use it?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All JCL Interview Questions & Answers - Exam Mode /
Learning Mode
|