what is diffrence between string and character array?
Answer / vadivelt
By default String always ends with NULL character ie., '\0'.
But in character array manually it is needed to terminate
with NULL(You can do this, only when you wanted to use
character array as string)
Eg;
char *p = "Vadivel"; /*By default string is terminated
with '\0'*/
char array[8] = {'V','a','d','i','v','e','l','\0'};
/*Here terminated manually*/
Is This Answer Correct ? | 9 Yes | 1 No |
Is it possible to execute code even after the program exits the main() function?
How to add two numbers without using arithmetic operators?
18 Answers College School Exams Tests, e track, Infosys, Pan Parag, Sapient, TCS,
explain what is a newline escape sequence?
can we define a function in structure?
main() { int a=0; if(a=0) printf("Ramco Systems\n"); printf("India\n"); } output?
Explain what is the difference between far and near ?
Is c programming hard?
Rapunzel walks into the forest of forgetfullness. She meets a Lion who lies on Monday Tuesdays and Wednesdays and meets a rabbit who lies on Thurs fridays and saturdays . On that day both say that "I lied yesterday". What day is it .
Write a program in c to print 1 121 12321 1234321 123454321
11 Answers ANR, College School Exams Tests, Mu Sigma, Wipro,
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
write a Program to dispaly upto 100 prime numbers(without using Arrays,Pointer)
26 Answers ADITI, iFlex, Infosys, Oracle, TCS, Unicops, Wipro,
Is c an object oriented programming language?