15,539 Topics

Member Avatar for
Member Avatar for selviManoharan
Member Avatar for Rob E

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 …

Member Avatar for Rob E
0
430
Member Avatar for skypower

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 …

Member Avatar for skypower
0
142
Member Avatar for paradiseis

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

Member Avatar for Salem
0
83
Member Avatar for gaurav2729

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 .

Member Avatar for chirag64
-1
126
Member Avatar for appunu

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 …

Member Avatar for appunu
0
170
Member Avatar for moroccanplaya

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() { …

Member Avatar for jephthah
0
115
Member Avatar for aiosarem

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 …

Member Avatar for aiosarem
0
6K
Member Avatar for appunu

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 …

Member Avatar for WaltP
0
422
Member Avatar for tquiva

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 …

Member Avatar for jephthah
-1
611
Member Avatar for tquiva

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 …

Member Avatar for jephthah
0
3K
Member Avatar for wackozacko

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 …

Member Avatar for Aia
0
2K
Member Avatar for koved

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 …

Member Avatar for 0x69
0
80
Member Avatar for johndoe444

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 …

Member Avatar for johndoe444
0
5K
Member Avatar for BLUEC0RE

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 …

Member Avatar for BLUEC0RE
0
636
Member Avatar for sourabhtripathi

[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

Member Avatar for Xufyan
0
94
Member Avatar for moroccanplaya

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 …

Member Avatar for Nick Evan
0
129
Member Avatar for wxy_3

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?

Member Avatar for sourabhtripathi
0
69
Member Avatar for johndoe444

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 …

Member Avatar for sourabhtripathi
0
334
Member Avatar for Xufyan

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]) …

Member Avatar for sourabhtripathi
0
98
Member Avatar for rafikul

[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?

Member Avatar for peter_budo
0
178
Member Avatar for bryann

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

Member Avatar for bryann
0
106
Member Avatar for farhanafzal

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 …

Member Avatar for jephthah
0
87
Member Avatar for md3258

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 …

Member Avatar for jephthah
0
94
Member Avatar for speedy94519

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 …

Member Avatar for jephthah
0
111
Member Avatar for nick22

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 …

Member Avatar for WaltP
0
972
Member Avatar for adxer

how do I go about adding a row to a column in simple code? and then printing out the results.

Member Avatar for WaltP
-2
54
Member Avatar for Ain_ee

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?

Member Avatar for Narue
0
34
Member Avatar for nath.sai1234

Why the compiler is generating the sentence, Lvalue required. what is the meaning

Member Avatar for Banfa
-1
102
Member Avatar for tquiva

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" …

Member Avatar for Banfa
0
2K

The End.