No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
This version1 of the code is a recursive function to print n to 0 values, but there is no return statement, is it using the return value of printf The version 2 of the code prints from 0 to n,and it worked even if we remove the return keyword as … |
|
The conditions for the question 1. you dont have any head ptr 2. you cant traverse as you dont have head ptr 3. its a singly link list 4. each node is dynamically allocated You only have a pointer to the node which you have to delete, and that is … |
|
I am doing malloc(0) and then doing strcpy and then reversing, and its working, why?? and if i dont do malloc(0) and then try to strcpy program carashed as expected, but how does malloc(0) making a difference.[code]#include <stdio.h> char* reverse(char *data); void my_Strcpy(char* dest,char* source); main() { char* p_Name = … |
|
I was going through the following pdf file, [url]http://www.cs.cmu.edu/afs/cs/project/vit/ftp/pdf/intro_softarch.pdf[/url] on page 7 it mentioned about the Abstract data type, and mentions about the understanding of the following (i am mentioning what i understood in RED) •the software structure (which included a representation packaged with its primitive operators), [COLOR="Red"]the class its … |
|
Trying to implement a stack using dynamic array. The Problem which i am facing is that if i a pushing 60 or 90 elements then the program is running fine but on inserting say 600 elements while printing the first two elements are showing junk value. Compiled the code using … |
|
Trying to write strcat function, kindly review the code and post the comments.[code]char* mystrcat(char* dest,const char* src) { char* ptr; ptr = dest; while(*dest++ != NULL); dest--; while(*dest++ = *src++); return ptr; }[/code] |