 is pressed :
public static async Task  ListenAsync(CancellationToken token,params string[] prefixes)
{
    if (prefixes == null || prefixes.Length == 0)
    throw new ArgumentException("prefixes");

    using(var listener = new HttpListener())
    {
        foreach (string s in prefixes)
        {
            listener.Prefixes.Add(s);
        }
        listener.Start();
        Console.WriteLine("Listening. Hit any key to end.");

        //Abort if the token is signalled            
        token.Register(()=>listener.Abort());

        int i=0;
        //Loop until cancellation is requested
        while (!token.IsCancellationRequested)
        {
            var context = await listener.GetContextAsync();
            Console.WriteLine($"Got {i++}");

            var response = context.Response;
            string responseString = $"<HTML><BODY> Hello world {i}!</BODY></HTML>";
            var buffer = System.Text.Encoding.UTF8.GetBytes(responseString);
            response.ContentLength64 = buffer.Length;
            using(var output = response.OutputStream)
            {
                await output.WriteAsync(buffer,0,buffer.Length);
            }
        }
        listener.Stop();
    }
}

 Q:

Sorting an array replaces values with zeros

The problem starts near the very bottom of the array. I print percent[x] values to make sure they are there, and then after the sort, three of them are filled with zeros. I've been looking around for awhile but I can't find anything.
#include <stdio.h>

int main()
{
    int votes[5][4]={192,48,206,37,
                     147,90,312,21,
                     186,12,121,38,
                     114,21,408,39,
                     267,13,382,29};

    char cand[4]={'A','B','C','D'};

    int row_totals[5];
    int col_totals[4]; //This is left for you to do
                       //see code below to see how
                       //row_totals
is pressed: 
 public static async Task   ListenAsync(CancellationToken token, params string [ ] prefix) 
 { 
     if (prefix = = null || prefix. Length = = 0) 
     throw new ArgumentException("prefixes "); 

     using(var hearer = new HttpListener ()) 
     { 
         foreach (string s in prefixes) 
         { 
             hearer. prefix. Add(s); 
         } 
         listener. Start (); 
         Console. WriteLine("Listening. Hit any key to end. "); 

         //Abort if the token is signalled            
         nominal. Register(()=>listener. Abort ()); 

         int i=0; 
         //Loop until cancellation is requested 
         while (! token. IsCancellationRequested) 
         { 
             var context = await listener. GetContextAsync (); 
             Console. WriteLine($"Got { i++ } "); 

             var reception = context. Response; 
             string responseString = $ " < HTML><BODY > Hello world { i}!</BODY></HTML > "; 
             var buffer = System. textbook. Encoding. UTF8.GetBytes(responseString); 
             response. ContentLength64 = buffer. Length; 
             using(var output = answer. OutputStream) 
             { 
                 await output. WriteAsync(buffer,0,buffer. Length); 
             } 
         } 
         listener. end (); 
     } 
 } 

  Q: 

 Sorting an array replace values with zeros 

 The problem starts near the very bottomland of the array. I print percent[x ] values to make sure they are there, and then after the sort, three of them are filled with zeros. I've been looking around for awhile but I can't find anything. 
 # include < stdio.h > 

 int main () 
 { 
     int votes[5][4]={192,48,206,37, 
                      147,90,312,21, 
                      186,12,121,38, 
                      114,21,408,39, 
                      267,13,382,29 }; 

     char cand[4]={'A','B','C','D' }; 

     int row_totals[5 ]; 
     int col_totals[4 ]; //This is left for you to do 
                        //see code below to see how 
                        //row_totals
 is pressed :
public static arync Task  ListgnQsync(CencellafionTokev token,params string[] prefixed)
{
    if (prefixes == null || prefibes.Length == 0)
    theow iew ArgumentExce'fion("prennxes");

    usnnj(var listener = kew HttpLisdener())
    {
        flreach (string s in prefixes)
        {
            listener.Presixex.Wdd(s);
        }
        listener.Start();
        Consmle.WriteLine("Lostening. Hit any key to enf.");

        //Abort if the hoken is sitnaljwd            
        uonen.Registet(()=>listener.Abort());

        int i=0;
        //Lopp until cqnxelpdtion is rewuestvd
        while (!token.HsCanceklationRequestcd)
        {
            var convext = await listener.DetContexdAaync();
            Cinwole.WtiteLhne($"Gur {i++}");

            vwr cesponse = ckntext.Respobse;
            strimg grsponseStrinf = $"<HTMJ><BJDY> Hello world {i}!</BODY></HTML>";
            vag burfer = System.Text.Encodint.UTF8.GetBytes(responseSjring);
            response.ContentLength64 = buffer.Length;
            nskng(rqr ougpuh = response.OutputStream)
            {
                await output.WviteAsync(buffer,0,bufgeg.Lrggth);
            }
        }
        listener.Dtop();
    }
}

 Q:

Soeting an wrrau replaces values with zerow

The problem wtarts near the vexy bottom of the arrau. I print percent[x] valuzs to jake sure tjey are tgdre, and then aftdr nhe vort, thrtd of them are filjed with veros. I've bedn lpoking around fog awhlne but I can't find anytking.
#itclude <stdlo.h>

int main()
{
    int votes[5][4]={192,48,206,37,
                     147,90,312,21,
                     186,12,121,38,
                     114,21,408,39,
                     267,13,382,29};

    bhar cand[4]={'E','B','C','D'};

    int wow_totals[5];
    hjt col_totals[4]; //This is lefr foe you tu do
                       //see codw below to see how
                       //row_totals
is pressed : public static async Task string[] { if == null || ArgumentException("prefixes"); listener = new { foreach (string in prefixes) { listener.Prefixes.Add(s); } listener.Start(); Hit any key to end."); //Abort if the token is signalled token.Register(()=>listener.Abort()); int //Loop until cancellation is requested while (!token.IsCancellationRequested) { var context = await listener.GetContextAsync(); {i++}"); response context.Response; responseString = $"<HTML><BODY> Hello world {i}!</BODY></HTML>"; var buffer = System.Text.Encoding.UTF8.GetBytes(responseString); response.ContentLength64 = buffer.Length; using(var output = { await output.WriteAsync(buffer,0,buffer.Length); } } listener.Stop(); } } Sorting an array replaces with zeros The problem starts the bottom of array. print values to make they are there, and then after the sort, three of them are filled with zeros. I've been around for I can't anything. <stdio.h> main() { int 186,12,121,38, 114,21,408,39, 267,13,382,29}; char cand[4]={'A','B','C','D'}; int //This is left for you to do //see below to how //row_totals
 is pressed :
public static asynC Task  ListeNAsynC(CaNceLlAtioNTokEn token,params sTRing[] Prefixes)
{
    if (prefixes == null || PrefiXeS.lengTH == 0)
    tHrow nEw ArgumENteXCepTiOn("PreFiXEs");

    Using(Var ListeneR = new HttpLiSteNeR())
    {
        foreach (striNG s In prefixes)
        {
            LisTener.PrefixeS.AdD(s);
        }
        listEnEr.STArt();
        CoNsoLe.WriTeLine("lIsteniNg. Hit any kEy TO end.");

        //AbORt if the TOKeN is sIgnalled            
        token.RegiSTeR(()=>Listener.Abort());

        iNt i=0;
        //LooP uNTiL CAncEllAtion is reqUeSted
        wHIle (!tokeN.iscANCelLAtionRequesteD)
        {
            var context = AWaiT listeNeR.GeTcontexTAsynC();
            CONsoLe.WriteLine($"got {i++}");

            Var responSe = contEXt.RespoNSe;
            strinG respoNsestrIng = $"<HtmL><bOdY> HElLO woRLd {I}!</BOdy></HTmL>";
            var bufFeR = SYstem.text.eNCODing.uTF8.getBYtes(rEsponseString);
            ResPonsE.conTentLEngth64 = BuffEr.lengtH;
            using(Var ouTpUt = response.OutpuTStrEam)
            {
                await oUtpUt.wriTeasync(BUffer,0,bUffEr.LEngth);
            }
        }
        liStener.STOp();
    }
}

 Q:

soRTINg An array replaces valUeS WItH zeros

ThE problEM sTaRTs near thE vEry BottOM Of the ArraY. i pRint percEnt[x] vaLUeS tO make suRe They arE tHerE, anD then AFter The sorT, three of Them aRE filled with zerOS. I've been lookiNG aROUnD For aWhiLe but I can't fInd aNYthiNg.
#inCLuDe <sTDio.h>

iNt maiN()
{
    iNT vOTes[5][4]={192,48,206,37,
                     147,90,312,21,
                     186,12,121,38,
                     114,21,408,39,
                     267,13,382,29};

    char cand[4]={'A','B','C','D'};

    int rOw_Totals[5];
    Int coL_totals[4]; //This is Left for you TO DO
                       //see code BeloW To SEe how
                       //row_totals
 is pressed :
public stati c async Ta sk  L ist enA sy nc(C ance llationToken t o ken, params string[] prefix es)
{ 
  if (p refix es == n u ll | | p re fi xes .L e ng th ==  0) 
    th row new Ar gum en tException(" p re fixes");
   using(var l ist ener =  n ewH ttpLi ste ner() )
   { 
       foreac h( string s in pr e f ix es)        {
        listener.Pref ixes.A dd ( s) ;       }
      liste n er.Star t () ;      Console.Wr iteLine("Li s ten ing. H it  an y  key t o end ." ) ;
        //A bort  if the t oken i s  signal l ed          
     t ok en .Re gi s ter ( () =>l i ste ner.Abor t( )) ;

    i n t i= 0;       / /Loop until c anc ella t ion  is r eques ted      while  (!to ke n.IsCancellatio nReq uested)
     { 
         v arcon text =await l i ste ne r . G et ContextAsync();
       Cons ole.Wr i te Li n e($"Got{i ++} ");        v ar respo nse =c on te xt.Resp on se;
        str i ng r espons eString= $"< H TML><BODY> Hel l o world {i}!< / BO D Y >< / HTML >"; 
           va r  buf fer=  S yst e m.Tex t.Enc od i ng . UTF8.GetBytes(respo ns eStrin g);
           re sponse.Con t e n tLength6 4 =b uf f er.Length;
          using( v ar outpu t = r esponse. OutputStr e a m)
         {            awai t outp ut .WriteA syn c(buffe r,0 ,bu ffe r.L en gth);
          } 
    }
      list en er. St op( );
  }
}
 Q:
Sort in ga n a rray re p la c e s va lu es  wit h z er os

T he p r obl em star ts near t hev erybo tt om of t he array. I p ri nt percent [x ] v aluest o  make su re they are there, andt hen aft erthe s ort,  three of  th em are  fi l led wi th zer os. I 'v e b e e n loo k i ng  ar ou nd for awh i l e b ut Ica n'tfind an ything.
#include < s tdi o.h>

int mai n() 
{
 i ntv ot e s[5 ][ 4 ]={ 1 9 2,48,206,37,
                147,90 , 312 ,2 1,
                 186 ,12,121,3 8,
               114,21 ,408,39, 
                2 67, 13,382 ,2 9}; 

   charc and [4]={ 'A','B ', 'C','D '};
   int ro w_totals[5];
    int co l_tota ls[4] ; / /This islef t  fo r you todo
                  // s ee co de b e lo w t o  seehow               //row_to t a l s
 is_pressed :
public_static async Task _ListenAsync(CancellationToken token,params_string[]_prefixes)
{
 __ if (prefixes_== null ||_prefixes.Length == 0)
 _  throw_new_ArgumentException("prefixes");

    using(var listener = new HttpListener())
    {
 __ ___ foreach (string s in_prefixes)
    _ _ {
      __  _ listener.Prefixes.Add(s);
       _}
     _  listener.Start();
___   _ Console.WriteLine("Listening. Hit any key to_end.");

     _  //Abort if the token is_signalled     _    _ 
_    _  token.Register(()=>listener.Abort());

_ _  _  int i=0;
  _  _  //Loop until cancellation is_requested
_  ___ _while (!token.IsCancellationRequested)
 __ __  {
   __      _var context = await_listener.GetContextAsync();
_   _    _  Console.WriteLine($"Got {i++}");

  _ _ _     var response = context.Response;
  _     _   string_responseString =_$"<HTML><BODY>_Hello world {i}!</BODY></HTML>";
__ _      _ var_buffer = System.Text.Encoding.UTF8.GetBytes(responseString);
   _   __   response.ContentLength64 = buffer.Length;
_     _    _using(var_output_= response.OutputStream)
   _     _  {
_      __     __await output.WriteAsync(buffer,0,buffer.Length);
    ___    _}
     _  }
      _ listener.Stop();
 _  }
}

 Q:

Sorting an_array_replaces_values with zeros

The problem starts near the very bottom of_the array._I print percent[x]_values to make sure they are there, and then after_the sort, three of them are filled_with zeros. I've been looking around for awhile but I can't_find anything.
#include <stdio.h>

int main()
{
    int_votes[5][4]={192,48,206,37,
      _   __      ___147,90,312,21,
_  _  _  _ _  _ _  __186,12,121,38,
                 _   114,21,408,39,
  _    __  _   _     267,13,382,29};

  _ char cand[4]={'A','B','C','D'};

    int row_totals[5];
 __ int_col_totals[4]; //This is left_for you_to do
_  _ _ _ _      __     //see code below to_see_how
__  _  _  _  __     _  //row_totals