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

Online poker web application, Project Description:  LOOKING TO DEVELOP ...

Project Description:  LOOKING TO DEVELOP A ONLINE POKER Web Application. WEBSITE WILL BE DEVELOPED OVER THE NEXT 6 MONTHS Duration & WILL REQUIRE FULL SOFTWARE CODING OF WEB

Define some features of static storage class in c program, Define some feat...

Define some features of static storage class in c program? The features of a variable defined to contain a static storage class are as follows. Storage - memory Default

I need asp .net facebook app project completion, I need Asp .net Facebook a...

I need Asp .net Facebook app project completion Project Description: We are urgently seeking a few remaining items to be completed, and the project to be deployed to live.

Implementation of the stack class in c++, Implementation of the Stack class...

Implementation of the Stack class in C++: How to implement stack class in c++. int Stack::push(int elem) {    if (top    {       list[top++] = elem;       r

Subtraction of numbers, Two numbers to be subtracted using bitwise operatio...

Two numbers to be subtracted using bitwise operations

Do friends break encapsulation?, A: No. If they're utilized properly, they ...

A: No. If they're utilized properly, they increase encapsulation. You frequently require splitting a class in half while the two halves will have distinct numbers of instances o

Displays the lower case and upper case alphabetical letters, Write a progra...

Write a program that displays both the lower case and upper case alphabetical letters using the following Format Lowercase        Uppercase a                        A

What are the different steps in executing a c program, Question 1 What are...

Question 1 What are the different steps in executing a C program? Explain Question 2 What are the commonly used input/output functions in C? How are they accessed?

Lexicographically preceding permutation, Given an integer n and a permutati...

Given an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. If the given

Pointers, When declaring a variable of data type pointer, use the * in fron...

When declaring a variable of data type pointer, use the * in front of the variable name. These variables hold a memory location (like B45CDF), not an actual value like 30 or A:

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