Software Development
Member Avatar

can anyone please tell me what is wrong with my program?

        Random n=new Random();
       int card[][]=new int[5][5];
       int bola[]=new int[75];
       int sw=0,ctr,x=0,no,win=0,dr=0,dl=0,h1=0,h2=0,h3=0,h4=0,h5=0, m1=0,m2=0,m3=0,m4=0,m5=0;

       String diagonal, vertical, horizontal, fourCorners;

        //UNDER"B"
              ctr=0; …
Topic by Felisha_1

OK, I'm not going to do you homework for you. However, you should seriously consider running this program through a pretty printer. The formatting is so bad that it's a …

Software Development
Member Avatar

this is the question given by my lecturer :-
Write a program to accept 5 students (names) and their respective test marks into an array or arrays. Sort them and …

Topic by wan_1

Well, I'm not going to do your homework for you. However, you should look closely at your numeric sorting function. It sorts the numbers, but it's missing something important.

c++
Software Development
Member Avatar

I came across this must-read article. I was a maintenance programmer for 29 years and I've come across many of the deadly sins that he discusses and maybe even one …

Topic by Reverend Jim

@Jim, wow this code is a real piece of work. My head hurt just looking at all those labels and gotos. Now, I do use gotos in my C code …

Software Development
Member Avatar

I came across this must-read article. I was a maintenance programmer for 29 years and I've come across many of the deadly sins that he discusses and maybe even one …

Topic by Reverend Jim

At one time, I used to write a lot of FORTRAN code. In FORTRAN, many of these gems were ingrained in the way you were taught (i,j,k as integer variables, …

Networking
Member Avatar

I am trying to understand the concept of ICMP and ARP... I made up the following network... and am having a tcpdump Ws1 and pinging Ws2. So by what I …

Topic by Nandomo

Here's a good explaination of ICMP redirects and when they're sent:
http://www.cisco.com/c/en/us/support/docs/ip/routing-information-protocol-rip/13714-43.html

Networking
Member Avatar

Any help that can be offered would be greatly appreciated. I just took on this account and all I want to do is rip everything down and re-wire it all …

Topic by Lightninghawk

Actually, you should consider making the default lease time much shorter. More like 30 minutes. This does increase the number of lease renewals, but guarrantees that anyone who's not actively …

Linux and Unix
Member Avatar

can the experts show me a few trick on getting started with c++, installing a compiler(the simpliest way pls.)

Topic by yeyo_1

If you're running any of the Debian-based distros, an "apt-get install build-essential" will install everything you need to be able to develop C/C++ code on Linux. Then make sure that …

Computer Science
Member Avatar

IF we send a huge different type of data(image,videos and music) for example through a network it will physically represented as bits 10101010 the question is how the device that …

Topic by Ghost0s

If you're sending this with TCP sockets, the data will be converted to a stream of bytes and stuffed into the packet to be sent. There are no delimiters placed …

Software Development
Member Avatar

I am trying to understand some old FORTRAN code and have reached a point that puzzles me.
In the main program, a 1-D work array has been defined.
i.e. - …

Topic by DavidB

In this case, FORTRAN formats arrays in column-major order. That is, columns are adjacent in memory instead of the rows (C is row-major order). So, the developer is taking advantage …