|
INTERVIEW QUESTIONS
MAINFRAME
JCL
DETAILS
Question: 15. #include<stdio.h> main() { char s[]={'a','b','c','
','c','
Answer: Answer: 77 Explanation: p is pointing to character '
'. str1 is pointing to character 'a' ++*p. "p is pointing to '
' and that is incremented by one." the ASCII value of '
' is 10, which is then incremented to 11. The value of ++*p is 11. ++*str1, str1 is pointing to 'a' that is incremented by 1 and it becomes 'b'. ASCII value of 'b' is 98. Now performing (11 + 98 – 32), we get 77("M"); So we get the output 77 :: "M" (Ascii is 77).
|
|
|
Category |
JCL Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 8598 users |
Added on |
9/2/2014 |
Views |
69939 |
Rate it! |
|
|
Question:
15. #include<stdio.h> main() { char s[]={'a','b','c','
','c','
Answer:
Answer: 77 Explanation: p is pointing to character '
'. str1 is pointing to character 'a' ++*p. "p is pointing to '
' and that is incremented by one." the ASCII value of '
' is 10, which is then incremented to 11. The value of ++*p is 11. ++*str1, str1 is pointing to 'a' that is incremented by 1 and it becomes 'b'. ASCII value of 'b' is 98. Now performing (11 + 98 – 32), we get 77("M"); So we get the output 77 :: "M" (Ascii is 77).
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 |
|
14. main() { int i=10; i=!i>14; Printf ("i=%d",i); }
|
} - JCL Interview Questions & Answers">
View Answer
|
|
12. main() { int c=- -2; printf("c=%d",c); }
|
} - JCL Interview Questions & Answers">
View Answer
|
|
11. main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }
|
display(string); } void displa - JCL Interview Questions & Answers">
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
|
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
|