With s it will take 9 name or words but prints only starting alphabets...and with c it will take characters and prints 9 characters which have entered....
for eg:-
with s it can take hello going sitting etc till 9 words but prints h g s i.e starting letter
with c it will take hello and going as characters i.e it will consider each letter of hello and going as a independent unit and prints hellogoing as sitting will be out of it memory size
If you use scanf( s &str[i]); then you can input 10 names like ravi rama kapil ..etc. But only the first letter of each names will be stored It you use scanf( c &str[i]); then you will be able to input only 10 characters.
Latest Answer : The term collision domain is defined as a logical network segment. In a collision domain, the packets of data collide with one another when they are sent on a medium which is shared. One of the most well-known examples of a collision domain is the Ethernet ...
In written they give two tests:-1) quant/aptitude/logical ppr 40ques in 40minutes2) technical test 75question in 40min apti/quant/logicalit was a very tough test i hav given test of 6-7 companies but csc
Latest Answer : If you usescanf("%s",&str[i]); then you can input 10 names like ravi, rama, kapil ..etc. But only the first letter of each names will be storedIt you usescanf("%c",&str[i]); then you will be able to input only 10 characters. ...
What is the return value from printf() function?
printf function always returns the number of characters printed. Let us understand this with an example:
main()
{
int a=10;
printf("%d",printf("%d %d %d", a,a,a));
}
In this above program the inner printf i
The arguments passed to function can be of two types
1. Values passed
2. Address passed
The first type refers to call by value and the second type refers to call by reference.
For instance consider program1
main()
{
int x=50, y=70;
interchange(x,y);
printf(“x=%d y=%d”,x,
There are several format specifiers available in printf. The format specifier used varies depending on the data type used for printing. The given below are some of the format specifiers used with printf in C program.
For integer data type the format specifier used with printf is %d or %i
For float
What is the difference between printf and sprintf?
sprintf: Writes formatted data to a character string in memory instead of stdout
Syntax of sprintf is:
#include <stdio.h>
int sprintf (char *string, const char *format
[,item [,item]...]);
Here,
String refers to the pointer to a
Difference between Scholarship and Grant While both scholarships and grants allow students to pay for their tuition without having to pay the money back there are a number of key differences between the two Knowing the difference between grants and scholarship will make it much easier for students t
The Difference Between Data Mart and Data Warehouse The biggest decision facing most IT managers today is whether or not they should construct the data mart before the data warehouse Many vendors will tell you that data warehouses are hard to build as well as expensive mosgoogle If you listen to som