Explain string constants in c language - escape sequences, C/C++ Programming

Assignment Help:

Explain string constants in c language - Escape Sequences?

Illustrations are "945", "hello", "well done", "5+3". The character constant (example 'x') isn't equivalent to the string constant (example"X"). Further a single character string constant doesn't have an equivalent integer value while a character has an integer value. Every string constant always ends with a special character '\0'. This character acts as the string terminator. The string of character used in a string constant is for all time stored in an adjacent memory location. C supports some backslash character constants that are used in output functions like printf.

            \n         -           stands for new line

            \b         -           back space

            \t          -           horizontal tab

            \0         -           null

            \v         -           Vertical Tab

            \r          -           Carriage Return

            \f          -           Form feed

            \a         -           Audible Alert (bell)

            \\          -           Backslash

            \?         -           Question mark

            \'          -           Single quote

            \"          -           Double quote

            \000     -           Oct Number

            \xhh     -           Hex number

Every one of these represents one character although they consists two characters and these combinations are called escape sequences.


Related Discussions:- Explain string constants in c language - escape sequences

Queue, program to enter 5 values in queue and remove value one by one from ...

program to enter 5 values in queue and remove value one by one from queue.

C++ ASSIGNMENT, How much does it cost to complete a C++ assignment that is ...

How much does it cost to complete a C++ assignment that is 80% finished??

Client server using c, (a) client server or multithreaded client-server, wh...

(a) client server or multithreaded client-server, where server will create pool of worker threads (say 5) to provide services to pool of clients (say 5 ).Server should be behaving

Functions overloading, Functions Overloading This a capability in which...

Functions Overloading This a capability in which a C++ program can have several functions performing similar tasks on different data types. When an overloaded function is calle

Caesar cipher, This task involves char arrays and pointer based string hand...

This task involves char arrays and pointer based string handling. Which we use to make a simple encryption program, using a Caesar Cipher, Write a program that: a. Asks

Program of conversion from basic to user-defined variable, Conversion from ...

Conversion from Basic to User-Defined variable Consider the following example. class Distance                  {                   public  :

I want skype recorder application, I want Skype Recorder Application + Setu...

I want Skype Recorder Application + Setup + Sourcecode + NICE UI Project Description: i want an application built which will allow user to record skype audio or video calls

Inverted Index Implementation, Need help finishing my homework. It''s been ...

Need help finishing my homework. It''s been 5 years since I''ve use C++. I am a VN.Net programmer. -Todd

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd