Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
131 views
in Information Technology by (114k points)
closed by

What will be the output of the following?
#include
int main()
{
// Line Splicing\
printf("Hello There\n");
printf("Thank You");
return (0);

}

1 Answer

0 votes
by (115k points)
selected by
 
Best answer
Correct Answer - Option 4 : Thank You

Explanation:

( // comment, /* comment */ ) these are used for commenting single line statement in C

( // comment \, /* comment */ \ ) these are used for multiline comment in C

Using backslash after every comment considers its succeeding line as a comment.

return statement:

  • A return statement marks the end of a function's execution and transfers control back to the calling function.
  • The calling function resumes execution at the point where the call was made.
  • A return statement can return a value to the calling function.
  • If a return value isn't required, declare the function to have a void return type.
  • If a return type isn't specified, the C compiler assumes a default return type of int.

 

1) example

// Line Splicing\                    is a comment
printf("Hello There\n");         it is also a comment
printf("Thank You");

Output: Thank You

2) example

// Line Splicing\                    is a comment
printf("Hello There\n");  \      is a comment
printf("Thank You");             it is also a comment

No output

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...