No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
#include<stdio.h> int myatoi(const char *string); int main(int argc, char* argv[]) { printf("\n%d\n", myatoi("1998")); getch(); return(0); } int myatoi(const char* string) { int value = 0; if (string) { while (*string && (*string <= '9' && *string >= '0')) { value = (value * 10) + (*string - '0'); string++; } … |
|
main() { int x=20,y=35; x=y++ + x++; y= ++y + ++x; printf(“%d%dn”,x,y); } what would be the output? can some one explain it with associativity and operator precendence |
|
#include<stdio.h> #include<stdlib.h> int input(int *a) { int n,i; printf("enter the no of elements:"); scanf("%d",&n); for(i=0;i<n;i++) { printf("enter the element:"); scanf("%d",a++); } return n; } int key_input(int *a,int key) { int k; printf("enter the key value which have to be searched in the array of no's provided:"); scanf("%d",&k); return k; } … |
|
pls suggest me some online tutorials for databases.finding it difficult to learn from textbooks |
|
can someone pls suggest me which one is better among omnetpp and NS2 to work on with.I am starter and pls post any online reference to study along with your opinion |
|
in the diagram provided in the attachment.i have created a table for the entity loan and now i am facing difficulty in creating a table for payment.i know that payment is the dependent entity.is the following way of creating a table correct???? create table payment( payment_number int, payment_date date, payment_amount … |
|
In chain hashing how can the order of deleting a node in double linked list be O(1) it should first check for the slot which is of O(1)and then it should check for the element to be to be removed in the linked list pointed by that slot which is … |
|
can any one tell me what is the advantage of using double linked list over single linked list in chain hashing during deletion and searching of the node??? |
|
what is the problem with this it is printing only the first node data :( .some one pls help me...[CODE]#include<stdio.h> #include<stdlib.h> struct node { struct node *prev,*next; int data; }; void create_list(struct node *list,int n) { struct node *n1,*n2; int i; n1=list; printf("enter the data for the 1 node:"); scanf("%d",&list->data); … |
|
some one help me pls.. segmentation fault for merge_sort....:( [CODE]#include<stdlib.h> #include<stdio.h> void merge_sort(int [],int ,int ); void merge(int [],int ,int , int); int main() { int i,n,a[25]; printf("enter the no of elements:"); scanf("%d",&n); for(i=0;i<n;i++) { printf("enter the element:"); scanf("%d",&a[i]); } merge_sort(a,0,n-1); for(i=0;i<n;i++) { printf("%d\n",a[i]); } return 0; } void merge_sort(int … |
|
segmentation fault...:( some one help me pls.. [CODE]#include<stdio.h> #include<stdlib.h> #include<string.h> int main() { char a[50]; char *x[10]; int i,j,n; char *temp; printf("enter the no of strings:"); scanf("%d",&n); for(i=0;i<n;i++) { printf("enter the string:"); scanf("%s",a); x[i]=(char *)malloc((strlen(a)+1)*sizeof(char)); if(x[i]==NULL){ printf("malloc not done"); exit(1);} strcpy(x[i],a); } for(i=0;i<n-1;i++) { for(j=0;j<n-i;j++) { if(strcmp(x[j],x[j+1])>0) { strcpy(temp,x[j]); strcpy(x[j],x[j+1]); … |