15,539 Topics
| |
| |
What a great site! I'm looking fo a hint. I'm new to any type of programming and this C code just doesn't seem to be working. I have attempted a program that gives the ohm value of a resistor when the color code is entered in. I am using an … | |
Hello there. This is my first post in this forum which, by the way, I find outstanding simply because everytime I google a C problem I find an answer here. Ok so, I have a very simple problem. I use Windows 7 and recently had a major problem about my … | |
add $t0 $zero ,$zero loop: beq $a1,$zero,finish add $t0,$t0,$a0 //$t0=$t0+$a0 sub $a1,$a1,1 j loop finish:addi $t0,$t0,100 //a=b+100 add $v0,$zero write the equivalent c language code snippets as comments. i have tried a bit but i not the answer correct a not | |
hi I m student of B.tech . I have an error in my c program ( [B]unable to open TV.LIB, Linking error [/B]).pls help me to remove this linking error . | |
ALl i need to find is the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6).I have coded with some logic and i could able to find the sum til this part 12345=>1+2+3+4+5=15 but i couldn able to carry on after that plz … | |
i want it to print out 4 is larger than 2 but it prints out 2 is larger than 2293572 [CODE] #include <stdio.h> #include <stdlib.h> void largest(int num1, int num2, int *larger) { if(num1 > num2) { *larger = num1; } else{ *larger = num2; } } int main() { … | |
Hi, I'm trying to learn the in's and out's of using the send and recv functions of a socket in C and I've hit a bit of a road block! I'm trying to send an integer from one system to another, however one system is big endian (the client) and … | |
hello people am new here.. and i started off coding.. i have few doubts. I want to roundoff a float value with no elements after the decimal point without using a lib function. For example 16.25 = 16.00 :) i tried printf("%.0f,16.25); and it prints 17.. If i know the … | |
Hi everyone. I just finished creating a program similar to minesweeper, but it's called miensfeld. The rule of the game are stated in the intro of the program. I was just wondering if anyone would mind checking it out for me? I just can't seem to compile it. But please … | |
when I try to compile a program, an error of the following comes up: cc -Aa -g -c -o main.o main.c <command-line>: error: missing '(' after predicate make: *** [main.o] Error 1 it indicate no line of where the error is located. has anyone ever came across this type of … | |
Ok, so I'm trying to write an emulator for a simple processor architecture and I've ran into a strange problem. I decided to read the input code once through to see how many lines there were, then set up an array of that length, and then go through the file … | |
i want to know what is the code written in header files.(how a functions works) is that possible for e.g. i created my own version of [U]sqrt[/U] function in .C now i want to know the difference b/w my code and sqrt function code. i want to check how efficiently … | |
I just copied and pasted all the things that has been happening from the shell here: [CODE]lin309-05:~/workspace/acm$ gdb a.out GNU gdb (GDB) 7.1-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute … | |
Hey guys, I am having a problem. When loadPref is executed, it opens, reads, and saves properly. But it crashes shortly after when the system call system("cls") happens. I do not understand why, any help? I removed most of the code that is not involved. Tests / Outcomes Removing loadPref … | |
[CODE]void main() { int a; char b; scanf("%d%c",&a,&b); /// char not taken ?? } // problem with buffer or stack [/CODE] i know this can be avoid by using fflush(stdin); or giving "\n" or space inbetween ; i need exact answer plzz help !!! thanks | |
hi i just started c programming and i am stuck on a question Write a void C function called largest that takes two integers passed by value and returns the larger of the two using a third integer parameter which is passed by reference. this is what i came up … | |
Hi; i have a problem about that i have two long strings of non-negative integers and i wanna denote adddition.How should i do this? | |
If the string is input from stdin: [CODE]scanf(" %s %d", R, &n);[/CODE] then is it possible to get the length of R as a by product from scanf as it already has scanned through the input? As you can see there can be spaces in front and after words and … | |
sorting in array, i'm stuck understand that why we've used a 'j' loop here ? can anybody explain ? and why we are checking this condition ? [iCODE] if(num[i]>num[j])[/iCODE] [CODE]int main(void) { int num[5],temp; int i,j; for(i=0;i<5;i++) { printf("Enter Value for %d",i); scanf("%d",&num[i]); } for(i=0;i<5;i++) { for (j=0;j<5;j++) { if(num[i]>num[j]) … | |
[code=c] #include<stdio.h> #include<conio.h> void main() { int a[] = {10,20,30,40,50},j,*p; clrscr(); for(j=0;j<5;j++) { printf("%d",*a); a++;/*here compiler error "lvalue required"*/ } p=a; for(j=0;j<5;j++) { printf("%d",*p); p++; } getch(); } [/code] i used turbo c++ compiler.and save this programme as abc.c why this type of errors occur? | |
Hi i know this may sound a bit silly but i have looked through some websites but can't really find exactly what the difference is between "=" and "==" For example [CODE]if(x==0) execl(“/bin/ps”, “ps”,”-eal”,NULL)[/CODE] how is that different from [CODE]if(x=0) execl(“/bin/ps”, “ps”,”-eal”,NULL)[/CODE] thanks | |
Write a C program using do while to find and print the average of three exam results of a student that will entered as an input from the keyboard. It repeats as many times as the user wishes. The program will ask for entering new entry (student grades) confirmation and … | |
I am trying to read a file and place the contents in various arrays. The fields are seperated by commas. I have fields that are strings, doubles, and integers. The string fields may contain characters such as ",&:. The double fields may not all be populated but I need to … | |
Hey is their a standard library that gives false and true values or something or are you suppose to assign them?? Im writing a function that suppose to return true or false. And i also tried replacing the words true and false by !0 (true) and 0 (false) but my … | |
I am very much a beginner and trying to create a linked list, asking the "user" to input 5 or 6 values. My problem is that I don't know the correct terminology or how to store the user's input so that I can create my pointer to the next value … | |
how do I go about adding a row to a column in simple code? and then printing out the results. | |
i am using linux and C as programming language. I want to display list of time zones to the user. How can i have list of all time zones in C. Also how can i get time zone of my system? | |
Why the compiler is generating the sentence, Lvalue required. what is the meaning | |
I am trying to create a game and tried compiling my program with my makefile, but I keep getting an error stating that there is something wrong in main. I can't seem to find the error, but this is how my main looks like: [CODE]#include "tfdef.h" #include "movement.h" #include "game_utils.h" … |
The End.