- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re: [QUOTE=rizrash;345029]hey friends this problem is definately hurting me !! its happening all the time now listen to this !! i changed the display screen of turo C from full screen to normal window view made a program nd run it !! afterwards it returned ack to that full screen and … | |
Re: Believe me nobody is gonna help you unless you show some progress in your assignment. | |
Hello everyone, Here's my code for making a dynamic array(the user inputs the size of the array). It's working fine but I think that I've not made the best code. Is there any suggestion for improvement or optimization? [code] #include <stdio.h> #include <stdlib.h> int main(void) { int *p; int n,i; … | |
Re: Your code is full of errors. 1. Check for matching curly braces. 2. main is returning "sum", it should return 0 3. Check for semicolons 4. C is case sensitive. What are ROWSIZE, COLSIZE? | |
Re: [QUOTE=keerthiga;981253]sum() integer x,y,z read x,y z=x+y print"the sum of x and y is",z end sum()[/QUOTE] Oh man, this is really funny. The OP is asking for elapsed time and you're telling him/her to add two integers. | |
Re: Use strtok(). | |
Re: [QUOTE=Dave Sinkula;961225]Associativity? I don't even think you got that right if you were trying to say precedence. [/QUOTE] Isn't the precedence of * and ++ same, that's why we look for the associativity in *p++ whcih is right to left. | |
Re: goto makes the code unreadable and hard to debug. The only place where goto is advisable is coming out of a nested loop. | |
Re: 1. Use code tags. 2. [code] scanf("[COLOR="Red"]&[/COLOR]c", &code); [/code] 3. Your do while will print invalid code even if someone inputs a valid code. 4. Use switch statements instead of if-else. 5. For double I think the format specifier is %f only and not %lf, but not sure. 6. Indent … | |
Re: 1.You're not creating the string properly.[COLOR="Green"] status==OUT[/COLOR]. 2. If you make the string properly then also the makenode function is not correct, you need to pass the characters of the string one by one, not the whole string at a time. In your case there are no left and right … | |
Re: [QUOTE=yasaswyg;941245]I need to write a function that traverses a general list and deletes all nodes that are after a node with a negative key. But I dont know where to start so can I get some help[/QUOTE] 1. Make a simple linked list by adding several nodes to it. 2. … | |
| |
Re: [QUOTE=waqarafridi;942675]Hello Every one Does any One know the format specifier for BYTE. so that it can give me Binary output.[/QUOTE] There is no format specifier for binary output, you have to make a code to get the binary output. | |
Re: [QUOTE=compubaba;940633]Agreed that a+b+c is (a+b)+c if left to right associativity is assumed . Do u mean that associativity rules are applied if an operand competes for two operators of same precedence simultaneously. Take an example f() + g() * h() When I want to evaluate this expression first I will … | |
Re: [QUOTE=riyas_26;940650]Going to attend interview in few hours pls i need some basic questions with answers in C Dont send links pls sirs i am fresher..[/QUOTE] So. What do you want us to do? We dont know what will be asked in the interview? BTW you cant crack an interview by … | |
Re: [QUOTE=no1zson;939411]Thanks I thought it was some kind of error deal. What do you mean exactly, "It's on main()"[/QUOTE] Adding to jephthah's reply, return 0 is optional in C99 standards. So you can remove it. | |
Re: [QUOTE=lecotti;940285]Hello, simple program here i can't seem to get to work. In a nutshell the program reads characters into an array using getchar and then prints them in a loop, although the numbers printed are not the ones i entered! thanks in advance [code]#include <stdio.h> #define MAXSIZE 100 /*max array … | |
Re: [QUOTE=farhan.foxtrot;940205]Compiling the following problem with visual studio 2000 gives the errors: temp.obj : error LNK2001: unresolved external symbol "void __cdecl ungetch(int)" (?ungetch@@YAXH@Z) temp.obj : error LNK2001: unresolved external symbol "int __cdecl getch(void)" (?getch@@YAHXZ) Debug/temp.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. The code is taken from Dennis … | |
Re: [QUOTE=yeshkadiyala;935548]Hello... Im a newb to both C programming and DaniWeb .. the prob is tht i try to compile this program in TurboC3 #include <stdio.h> #include<Conio.h> main() { printf( "hello" ); getch(); } when i press " alt+F9 " it says " Warning:: program should return a value" and no … | |
Re: [URL="http://www.eternallyconfuzzled.com/arts/jsw_art_rand.aspx#wrapper"]Here[/URL] is some info about rand function | |
Re: gotoxy is not a standard C function, so you need other library for that. | |
Re: [QUOTE=Karthy;936111][B][I]why C is a not a object oriented program ?[/I][/B][/QUOTE] [COLOR="Red"]Because C++ is.[/COLOR] | |
Here is a code: [CODE] #include<stdio.h> #include<string.h> int main(void) { char *s1="hello"; char *s2="world"; char *s3; s3=strcat(s1,s2); printf("%s",s3); } [/CODE] What does strcat returns? Why does this code results in run time error? And one more question : Are "hello" and "world" terminated with '\0' in case of char pointers? … | |
here is a code [CODE] #include<stdio.h> int main(void) { int b[10][5] ; int (*q)[10][5] = &b ; printf("%d", (char*)(q+1) -(char*)q); } [/CODE] the output it produces is 200 while if I change the typecast to (int *)(q+1)-(int *)q, the output is 50. I know that q is a pointer to … | |
Here is a code [CODE] #include<stdio.h> int main(void) { int a; a=f(10,3.14); printf("%d",a); } int f(int aa,float bb) { return (aa+bb); } [/CODE] If I run the code it produces garbage value, but if I declare the prototype of the function before main it produces the correct output as 13. … |