anonymous
  • anonymous
Function to return the alphabetical minimum. typedef char Atom; Atom minim(Atom* a,int nr) { Atom mini; int i; mini=*a; for(i=1;i
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
jamiebookeater
  • jamiebookeater
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
@amistre64 @Hero @nincompoop @sammixboo @kropot72 @Kainui @surjithayer @timo86m @Jaynator495
anonymous
  • anonymous
Atom* sortat(GLista L) { GLista p; Atom *a; a=new Atom; int i; if(!L) { cout<<"Lista vida"; } else { for(p=L,i=0;!p;p=p->link,i++) { if(p->tag==ATOM) { *(a+i)=p->data.A; } else { sortat(p->data.L); } } } return a; } HERE IS THE CODE FOR THE CHAR POINTER I MUST FIND THE MINIMUM FOR
anonymous
  • anonymous
@ganeshie8

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
My minimum function doesnt work so well(it returns garbage values of ASCII code instead of returning me CHAR LETTERS which I inputed)
amistre64
  • amistre64
what I would do (if i understood your syntax and i dont) is comment the code, explain what you are expecting each line to accomplish and how it is to be accomplished.
amistre64
  • amistre64
i dont know what an alphabetical minimum is (assuming it may be the smallest ascii value?) define a reference point (R) to be the highest ascii value, or something absurd that is greater than any ascii value that can be written. split the input into an array; or if you know how to point to the string positions thats fine get the ascii value of the starting position, if that value is less then (R), then (R)=current ascii value repeat for the length of the string
anonymous
  • anonymous
alphabetical minimum is the smallest ascii value for a capital letter
anonymous
  • anonymous
i only deal with capital letters
amistre64
  • amistre64
then you have a range to compare to, or do you uppercase the string?
anonymous
  • anonymous
To understand better what's the meaning of this code: It's an application for generalised linked list: where input looks like this: (A,B,C) A->B->C->NIL (D,(Q,R),V) D->(ptr)->V->NIL |->Q->R->NIL
anonymous
  • anonymous
the deal is to find the alphabetical minimum of all letters of the list and sublist so I thought putting all letters in an array would be a great idea.
amistre64
  • amistre64
if the list is rather lengthy, it might do better to cycle thru the ascii values and compare to a finding/search function. does your coding language have something similar to: indexOf() http://www.w3schools.com/jsref/jsref_indexof.asp
amistre64
  • amistre64
once the lowest value is found, break out of the 26 item loop :) other than that, someone else would be ore qualified im sure. my knowledge is not in syntax.
anonymous
  • anonymous
my coding lang is c++ and the app doesnt require a certain level of COMPLEXITY
anonymous
  • anonymous
i want to know why my minimum function doesnt return a correct value
anonymous
  • anonymous
i've double checked every pointer instruction
amistre64
  • amistre64
when i troubleshoot my code, i tend to have to do what i suggested - comment every line and make sure it is doing what i expect it to ... is it getting the correct input? is it following thru with the correct output? i cant go thru your code in that detail since i am just not that adept at the syntax you are using.
anonymous
  • anonymous
how can i submit my whole code to you?
anonymous
  • anonymous
attach is okay ?
amistre64
  • amistre64
i dont have a complier to assess with, but someone else may.
anonymous
  • anonymous
typedef char Atom; Atom minim(Atom* a,int nr) { Atom mini; int i; mini=*a; for(i=1;i
anonymous
  • anonymous
this function should get me the alphabetical minimum for every pointer I put, Am I right?
amistre64
  • amistre64
your looping thru a length of nr not sure what *a is. or how it is being assessed .... Atom* a means nothing to me ... i cant read your code that well to make any specific logic of it but if *(a+i) is the ascii value of a position in an array, and if it is less than the current mini value, then yes we would want to redefine the mini value to match it. and when list is completed (as long as the process hasnt been reset along the way or some nonUPPER hasnt been introduced inadvertently) seems that it should work on the face of it.

Looking for something else?

Not the answer you are looking for? Search for more explanations.