Interviewer And Interviewee Guide
Interviews Quizzes

Aptitude Interview Question:

What is the o/p of the following C-program?
Main()
{
Char str[7]="strings";
Printf("%s",str);
}

Submitted by: Administrator
This problem doesnt cause any kind of error!!! this is really tricky.. the size of the string "strings" is 7 but it terminates with a char. thus causing the total size to 8.

here in this case some abserd value will come as an output..

if the size of the array is less than 7 then it ll give the error " too many initilization"

and if the size is more than7 then the output ll be perfect and "strings"
Submitted by: Administrator

Read Online Aptitude Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.