IndiaBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning Non Verbal Reasoning
General Knowledge
Sudoku Number puzzles Missing letters puzzles Logical puzzles Playing cards puzzles Clock puzzles
C Programming C# Programming Java Programming
Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing
Placement Papers Group Disucssion HR Interview Technical Interview Body Language
Aptitude Test Verbal Ability Test Verbal Reasoning Test Logical Reasoning Test C Programming Test Java Programming Test Data Interpretation Test General Knowledge Test
Data Structures Operating Systems Networking DATABASE Database Basics SQL Server Basics SQL Server Advanced SQL Server 2008 JAVA Core Java Java Basics Advanced Java UNIX Unix File Management Unix Memory Management Unix Process Managemnt C Interview Questions The C Language Basics .NET Interview Questions .NET Framework ADO.NET ASP.NET Software Testing

C Programming - Strings - Discussion

@ : Home > C Programming > Strings > General Questions - Discussion

Read more:

"Success has many fathers, while failure is an orphan."
- (Proverb)
3. 

How will you print \n on the screen?

[A]. printf("\n");[B]. echo "\\n";
[C]. printf('\n');[D]. printf("\\n");

Answer: Option B

Explanation:

The statement printf("\\n"); prints '\n' on the screen.


Sunny said: (Thu, Mar 17, 2011 12:45:48 PM)    
 
Great. Really good one example.

Shashank said: (Sun, Sep 18, 2011 10:37:59 PM)    
 
Give me specific reason about this answer. Why there is "\\" is used ?

Deepak said: (Mon, Oct 10, 2011 10:18:26 PM)    
 
Give me specific reason about this answer. Why there is "\\" is used ?

Vinod said: (Sat, Jan 7, 2012 02:12:41 PM)    
 
This is verbatim string. Putting any special character after "\" sign ignoresthe next character for compilation.

Write your comments here:
Name *:     Email:


© 2008-2011 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Advertise     Contact us: info@indiabix.com     Follow us on twitter!