Computer Science - Object Oriented Programming Using C++ - Discussion
Discussion Forum : Object Oriented Programming Using C++ - Section 1 (Q.No. 15)
15.
The newline character is always included between
Discussion:
8 comments Page 1 of 1.
MAJID IQBAL said:
1 decade ago
Syntax of printf () is :
printf ("Control String", arg1, arg2, …. , arg n) ;.
Explanation:
(1) The "Control String" specifies the field format in which data is to be printed on terminal.
(2) It consists of three types of items.
A. Characters (String) that will be printed on the screen as they appear.
B. Format specifications that define the output format for display of each item. (like %d %f %c %ld %u etc).
C. Escape sequence characters such as "\n" (new line character) etc.
printf ("Control String", arg1, arg2, …. , arg n) ;.
Explanation:
(1) The "Control String" specifies the field format in which data is to be printed on terminal.
(2) It consists of three types of items.
A. Characters (String) that will be printed on the screen as they appear.
B. Format specifications that define the output format for display of each item. (like %d %f %c %ld %u etc).
C. Escape sequence characters such as "\n" (new line character) etc.
Saba said:
5 years ago
Control string is " ".
Escape sequence characters such as "\n" (newline character) etc.
Example printf ("hello \n world") ;.
it will display hello and then a new line then display world.
Hello.
World.
Escape sequence characters such as "\n" (newline character) etc.
Example printf ("hello \n world") ;.
it will display hello and then a new line then display world.
Hello.
World.
Fayaz said:
9 years ago
I think option A is correct let see example printf("hello \n world");
It will display hello and then new line then display world.
It will display hello and then new line then display world.
Syed saif ali said:
8 years ago
The control string used with printf for printing the o/p. Ex- %d. %c, %%f.
Manish soni said:
1 decade ago
Newline character is \n which is included between ' '.
Like as '\n'.
Like as '\n'.
Harpreet said:
1 decade ago
Plz tell us about the control string?
Nilesh said:
1 decade ago
Control string is " "...
Gautam said:
1 decade ago
What is control string?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers