:: Home Page
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   Errors
   Testimonials Refer this Site  Refer This Site to Your Friends  Site Map  Contact Us      
Categories >> Software >> Programming Languages >> C


Question main()
char *p1="Name";
char *p2;
p2=(char *)malloc(20);
what is the output?

 Question Asked In Companies :: HCL, Ramco, Zycus Infotech, AMCAT,     < I also faced this Question! >
 Question Submitted By :: naveed
  Answer Posted By  
A part of uninitialized (and/or unowned) memory after (and
including) the sixth byte of the malloc-ed memory will be
printed out until reaching a NULL character in the memory

Is This Answer Correct ?    5 Yes 4 No

  ali fakoor
View All Answers
Please Help Members By Posting Answers For Below Questions
 Question Views   Select
what is reason of your company position's in india no. 1. 628
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”. 516
how to find binary of number? 1002
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL. 409
about c language 360
What is pre-emptive data structure and explain it with example? 2025
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits. 2155
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos. 390
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop 493
write a program to print largest number of each row of a 2D array 719
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics 1302
in a town the percentage of men is 52 the percentage of total literacy is 48 if total percentage of literate men is 35 of the total population write a program to find the total no of the literate men and women if the population of the town is 80000 5744
what will be maximum number of comparisons when number of elements are given? 250
E-Mail New Answers        Answer Selected Questions