plz send me all data structure related programs
Answers were Sorted based on User's Feedback
Answer / prof.muthu
stack,queue,tree,graph....
these are muthu's data structure...,
plant,fruits,line
if u want to learn my data structure please feel free to
call me!
ph:+919962940220
by prof.muthu....(c/o Anitha mosess)
Is This Answer Correct ? | 2 Yes | 4 No |
In the following pgm add a stmt in the function fun such that the address of 'a' gets stored in 'j'. main(){ int * j; void fun(int **); fun(&j); } void fun(int **k) { int a =0; /* add a stmt here*/ }
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
#define SQR(x) x * x main() { printf("%d", 225/SQR(15)); } a. 1 b. 225 c. 15 d. none of the above
main() { int c=- -2; printf("c=%d",c); }
main() { struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }
main() { clrscr(); } clrscr();
main() { char *p; p="Hello"; printf("%c\n",*&*p); }
Program to find the largest sum of contiguous integers in the array. O(n)
main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
In a gymnastic competition, scoring is based on the average of all scores given by the judges excluding the maximum and minimum scores. Let the user input the number of judges, after that, input the scores from the judges. Output the average score. Note: In case, more than two judges give the same score and it happens that score is the maximum or minimum then just eliminate two scores. For example, if the number of judges is 5 and all of them give 10 points each. Then the maximum and minimum score is 10. So the computation would be 10+10+10, this time. The output should be 10 because 30/3 is 10.
main() { char *p = “ayqm”; char c; c = ++*p++; printf(“%c”,c); }
char *someFun1() { char temp[ ] = “string"; return temp; } char *someFun2() { char temp[ ] = {‘s’, ‘t’,’r’,’i’,’n’,’g’}; return temp; } int main() { puts(someFun1()); puts(someFun2()); }