Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
c
« Previous
Next »
What is the output of the following code?
void main()
{
char str =`Z`;
printf("\n%c",str);
}
Options
- 26
- Error
- Z
- None of the above
CORRECT ANSWER : Z
Discussion Board
Correct answer is "Error"
in the program Z is enclosed by `` symbol not by single quote '''' so it will throw an error
Shilpa s gowda 08-31-2018 04:22 AM
Explain
Its a Simple program. If the above printf statement would have been like printf("\n %d",str); then the output will be 90 ! ASCII value of 'Z'
Sivaprakash G 07-16-2014 12:37 AM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
C test (42)
C (12)
C++ for beginners (10)
C++ (20)
C++ (24)
C++ (18)
C++ (14)
C++ (12)
C++ (15)
C++ (15)
Data structure (20)
Data structure (10)
Data structure (10)
Data structure (10)
PERL (25)
VC++ (11)
Oops (30)
Mainframe (41)
Mainframe (15)
Embedded systems (15)
OOAD (49)
Advertisement
▲