Answer Posted / sourisengupta
free(ptr);
free takes the pointer variable as argument. The intial
data at that location holds a value of number of bytes that
pointer is pointing to. According to the information, it
frees
the memory.
| Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
Why is it usually a bad idea to use gets()? Suggest a workaround.
To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9
Why are all header files not declared in every c program?
Can you return null in c?
What's the total generic pointer type?
What is scope and lifetime of a variable in c?
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
Explain what is the best way to comment out a section of code that contains comments?
Is fortran still used today?
write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
What is identifiers in c with examples?
What is data structure in c and its types?
The statement, int(*x[]) () what does in indicate?
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250