473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

How to print hello world in double quote in c ?

How to print hello world in double quote in c ?
Sep 24 '15 #1
1 7458
weaknessforcats
9,208 Expert Mod 8TB
You have to use an escape sequence.
The escape sequence is a backslash (\). The \ tells the compiler that the character behind the backslash is a code for something else.

So \" says that the " is not part of the syntax but is data:

Expand|Select|Wrap|Line Numbers
  1. printf("\"Hello world!\""\n);
See also the \n. The compiler does not see this as a \ and an n but a code. In this case \n is the code for a newline on the screen.

There are various escape sequence characters that you should review.
Sep 24 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

26
by: Santanu Chatterjee | last post by:
Hello all, I would like to know how an OS makes a computer boot up. For that, as a start I would like to see an e_ample (read the underscore as the letter before y, as the keyboard here is...
134
by: evolnet.regular | last post by:
I've been utilising C for lots of small and a few medium-sized personal projects over the course of the past decade, and I've realised lately just how little progress it's made since then. I've...
1
by: fred | last post by:
Hi, is there a way to put " (double quote) into a verbatin string? thank you
13
by: jningombam | last post by:
Hi all, Could anyone please help me to print "Hello World" in C programming language without including any code inside main function Regards.
18
by: arnuld | last post by:
i compiled the "hello world" programme from K&R2: #include<stdio.h> int main() { printf("hello world\n"); }
4
by: arnuld | last post by:
i am learning C and doing the exercise 1-1 of K&R2, where K&R ask to remove some parts of programme and experiment with error, so here i go: #include <stdio.h> int main () { printf('hello...
2
by: EdKing | last post by:
Hi everyone, I'm currently trying to get the simplest "Hello World!" Python script working on a Telit GM862-GPS. I have succeeded in writing to the Telit via the Hyper Terminal and can confirm...
2
by: Bill H | last post by:
Everyone probably started with the infamous print "hello world" as their 1st program. I am looking for a site online that basically does the same for php & database communication. A site that walks...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.