- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re: [code=c] 1. /* struct sockaddr *to_cast = (struct sockaddr *)serv_addr; */ 2. if (connect(sockfd,(struct sockaddr *)&serv_addr,sizeof(serv_addr))) < 0) [/code] | |
Re: What's the purpose of using three consecutive fgets? (line 55, 56 and 58) Buffer s always contains the contents read by third fgets so can you tell how data is organised in your file. | |
| |
Re: [code=c++] void drawshape(int row) { int i; for (i=1; i < row; i++) cout<<setw(i+1)<<'#'<<setw(row*2-i*2)<<' '<<'#'<<endl; cout<<setw(i+1)<<'#'<<endl; } [/code] | |
Re: At line 12 you are working on one byte, means interchanging last 2 nibbles. so after line 12 executes x becomes 0x00000040. X has lost its original value. You cannot operate on x in two statements. This can be done if you take other variable. But for x you need … | |
Re: In your code once you read the account number, for loop iterates for 1000 times. For the very first read array is filled with accnum (assuming you have initialised array to zero). You must use break statement as soon as an empty slot is filled. | |
Re: Read the file line by line into a buffer, use strtok_r on each subsequent line. Also be careful strtok function modifies the strings passed to it. | |
Re: Any good c book will help will you lot than others. | |
Re: Did you check the permission of the directories in which you are creating a new directory. | |
Re: Its not always. The deciding factor is machine type(32bit or 64bit). So for 32 bit machine boundary condition is double word and for 64bit machine it's quad word. Address calculation by processor is easy if words are stored at boundary and hence minimum number of cycles required to fetch the … | |
Re: [QUOTE][code=c] break;[/code] [/QUOTE] always puts the control out of immediate loop in which it is declared. In your case it will come out of the second for loop not the first one. | |
Re: Considering ascii data, fwrite will write sizeof(num) characters to the standard ouput. Characters order depends on machine type - little endian or big endian. | |
Re: If arrays has been not taught in the class why you want to use it? If you really want to learn something, then work on it. Guys here are ready to help you but first you must help yourself. | |
Re: Additionally, once you get the sum of the numbers, perform any sorting technique(bubble sort, selection sort, etc.) on it. | |
Re: pls reconsider your while loop. its a infinite loop. 'n' never changes so 'count' gets continuous increment. hence 'ans[count]' gives segfault. | |
i've copied this code from net but this is not working. Only blank output. can anyone help. i'm new to assembly. [code][ORG 7C00h] ; This is where BIOS put me ; --------------------------------------------------------- ; Main program ; --------------------------------------------------------- mov si, msg ; Print message call putstr hang: jmp hang ; Hang! … | |
Re: When a file is created in linux, a inode number is assigned to it and name of a file is link to that inode number. using this link we can perform any operations on the chosen file. Now when you open a file, kernel increments the reference count of that … | |
Re: Answers 1) take array of `int catg[4] = {0, 0, 0, 0}` now once a category is chosen set that array index. suppose catg 1 is chosen then `catg[0] = 1;` insert code to test if catg is set, yes break if (categoryno == 1) { if( catg[0]) { printf("choose … | |
Re: you are expecting function max to return maximum value but its return type is void. |