semicolon ';' (Not applicable for block-statements)
For clasesses it defines from which class to inherit. :: means area of visibility in certain name space.
Sure.for (i=0; i
== == What is printf in c or prototype of printf with example (q) What is prototype of printf function ? Explain each term. Ans: Prototype of printf function is : int printf( const char *format ,…) Explanation of each term : Parameter of printf function is : (three continuous dots) : It is called ellipsis. It indicates the variable number of arguments. Example of ellipsis: #include void ellipsis(int a,...); void main() { int a=5,b=10; clrscr(); ellipsis(a,b); getch(); } void ellipsis(int a,...) { printf("%d ",a); } Output:5 So printf function can have any number of variables as an argument.
The printf function calls on fprintf to write the result of sprintf to standard output. That is:printf("%i\n", 42);is exactly equivalent to:fprintf(stdout, "%i\n", 42);
try to usecondition ? value if true : value if falseor: if (printf ("Hello")) {}
semicolon ';' (Not applicable for block-statements)
Printf function is used in c language. Printf is used to print something to the standard output. ex: printf ('welcome');
For clasesses it defines from which class to inherit. :: means area of visibility in certain name space.
Why semicolon? Tradition.What does it do? Terminates a single statement, eg:i+= 3; /* expression is a single statement */{ i= 3; --j; } /* no semicolon after the compound statement */
Sure.for (i=0; i
Why not? In this example there three semicolons, and one colon. for (i=0; i<10; i>3? i+=2: i++) printf ("%d\n", i);
== == What is printf in c or prototype of printf with example (q) What is prototype of printf function ? Explain each term. Ans: Prototype of printf function is : int printf( const char *format ,…) Explanation of each term : Parameter of printf function is : (three continuous dots) : It is called ellipsis. It indicates the variable number of arguments. Example of ellipsis: #include void ellipsis(int a,...); void main() { int a=5,b=10; clrscr(); ellipsis(a,b); getch(); } void ellipsis(int a,...) { printf("%d ",a); } Output:5 So printf function can have any number of variables as an argument.
Whoever said so, they were wrong. For sure "printf" can be used without any problem.
well major difference between scanf and printf is that scanf is an input statment and printf is an output stament scanf is used to take data in from the user and printf is used to display the result on the screen Regards
The printf function calls on fprintf to write the result of sprintf to standard output. That is:printf("%i\n", 42);is exactly equivalent to:fprintf(stdout, "%i\n", 42);
A semicolon can be used for separating the initial value, condition, and increment statement within a for loop. A comma can be used to separate elements of an array and parameters for methods and classes.