- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 7
- Posts with Upvotes
- 7
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I'm using the following swap function to swap two elements of an array. The element pointed to by 'x' and 'y' and the one right below it, to be particular (then i want x and y to point to the second of the swapped elements, hence i use auto increment). … |
|
Re:
Just need help with regards to this part, i'm meant to use scanf() to read a string from keyboard and return number of characters read, so i'm supposed to read a character string. The scan must then terminate at whitespace. A null character is stored at the end of the … |
|
Re:
I wanted to create a simple table by printing lines in between my values with a header at the top and my numbers left justified. However, when I get to a ten digit number or larger, my code seems to break and my count variable goes to zero as far … |
|
Re:
hey im trying to create a program to convert dec to hex , but this only lets me print either integers or chars , but not both , how do i fix that ? [code] int convertHex(int num) { quotient=(num / 16); remainder=(num % 16); if (remainder <= 9 && … |
|
Re:
I've been trying to read characters from the keyboard using 'getchar()' but my code always misses one character. Can anyone tell me why this is [CODE=suntax]#include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *argv[]) { char string[50]; int i; printf("Enter a string: "); for (i=0; i < strlen(string); … |
|
Hi, I'm trying to call a bunch of methods during run-time using reflection, but I'm getting an exception saying "IllegalArgumentException: wrong number of arguments". Here's some information on the variables used. - All elements of mailTestClass[] are classes that extend AbstractTestCase. (FirstTestCase extends AbstractTestCase and FirstTestCase.class is the first element … |
|
Re:
1. Write a C program to convert a given infix expression to postfix form using stacks 2. Write a C program to evaluate the postfix expression using stacks |
|
Re:
Hi guys , In Visual Studio 2005 I compiled the following code [CODE] int main() { float a; a=0.1; if(a<0.1) { printf("C\n"); } else { printf("C++\n"); } } [/CODE] I was very surprised when I saw the output C++ . I got the warning C4305 :" '=' : truncation from … |
|
Re:
sir, pls help me to write a coding in c for algebraic reconstruction method..... 1 2 3--------->6 4 5 6--------->15 7 8 9--------->24 | | | | | | | | | 12 15 18 Its a three dimensional one in dat first row addng threenos get into 6 and … |
|
Re:
HI I need a little help with this program [code=c] #include<stdio.h> #include<conio.h> void main () { float num1,num2,result=0; char ch; clrscr(); printf("\nEnter 1st num:"); scanf("%f",&num1); printf("\nEnter 2nd num:"); scanf("%f",&num2); wrong: printf("\nEnter + for addition" "\nEnter - for subtraction" "\nEnter / for division" "\nEnter * for multiplication\n"); scanf(" %c",&ch); if (ch=='+') … |
|
Re:
hey..i am a novice when it comes to C programming coz i am a bio-engineer..however, i landed a job with an It giant, and we have been allotted a project(for practice's sake though!) by them on a trainee level..ofcourse, it involves a normal-login program..i was able to figure out most … |
|
Re:
As some of you would already know, I made a program which accepts login and password from users and shows "*" instead of actual password characters. I know the program is grossly incorrect but I still tried to apply whatever I picked up using books and example programs. *****DISCLAIMER- I … |
|
Re:
i need to merge two arrays..assign them to another array..but in the third array..no similar values shall be printed..i badly need help.. a big big thanks in advance.. |
|
Re:
I'm working in a project and part of it is to do a small encryption program. W can use substitution encryption where each character is substituted by another pre-determined character. Can someone kindly help me with an algorithm. I just can't think any more! Thanks drjay |
|
Re:
Hey - I'm new asking questions here. I'm writing a simple program to give a number to a power using a recursive function (inconvenient, but that's the assignment). It seems as though the program should work, and debugging shows that it almost does. It has the right value up until … |
|
Re:
I'd like to implement a sorting algorithm(quicksort or bubblesort or mergesort... it doesn't matter. anything that sorts is ok) into my insert function, so that everytime i create a new element it'll be inserted into right position. The variable listptr is the pointer pointing to the address of the first … |
|
Re:
Hi. I am trying to merge 2 chars. in C but i don't know how to do it. My code: [code] char dd[1], aa[2]; dd[0] = "2"; dd[1] = "3"; aa[] = dd[0] + dd[1]; [/code] So it aa[] should show: 23 but it gives error. Maybe i am doing … |
|
Re:
hallo i wrote a program with 3 different functions. something wrong with her and i cant see it. [code=c] #include<stdio.h> int devide9(int num); int decimal_binar(int num); int binar_decimal(int num); int main() { int menu, num9, numd1, numb1, numd2, numb2, numfinal1; printf("\nHallo these are your options:\n"); printf("1. Check if your number … |
|
Re:
Hello, Is anybody know who is the father of the C language . Please tell me hurry its urgent . I am waiting for your reply. Thanks |
|
Re:
I am a novice in C. I am trying to assign a value from a file to a pointer as below. However I am gettign a seg fault. Can somebody explain ? int i1; char *glblclrtab; ... for (int i=0; i<20; i++) { while ( (i1= fgetc(ipFile))==NULL); *(glblclrtab+i)= char (i1); … |
|
Re:
I need to write a program that sorts some data into ascending order. I was looking in my programming book and found a sample program that does that such thing. I am a little confused on some of the aspects of the code they used, and they didn't comment on … |
|
|
Re:
Hi, I am trying to get an example program to run, but it isn't working. I've probably typed something incorrectly, but I have checked three times and I just don't see it. Anyway, it's a sample program from the C Primer Plus book that is supposed to add the rows … |
Re:
please do the following data structure program : write a menu driven C program to implement the following set of stack operations using the linked list representation: (a)create stack (b)push (c)pop (d)stack top (e)full (f)empty (g)stack count (h)destroy stack |
|
Re:
hello friends this code for delete a file,when i was execute it i got o/p [B]success[/B]but the file was not deleted from my HDD. [code=c] #include<dos.h> #include<conio.h> #include<stdio.h> main() { clrscr(); union REGS i,o; char far *fname[67]; puts("enter" ); gets("fname"); i.h.ah=0x41; i.x.ax=(int)fname; printf("%d",i.x.ax) ; intdos(&i,&o); if(o.x.cflag==0) printf("success") ; else printf("attempt … |
|
Re:
here is my code so far: [CODE] #include <stdio.h> #include <string.h> struct sale { int week; int units; int price; char name[30]; }; int main(int argc, char *argv[]) { int week = 0; int units = 0; int price = 0; char name[30]; int count = 13; int i = … |
|
Re:
hello i am new to these boards and new to the language of c. i am trying to figure out this user input stuff....and i am about to kill myself! every time i think i have it...C throws me another road block. i am trying to create a menu based … |
|
Re:
Hi there, I have a very simple code made of a main.c and a function defined in its own .c and .h files. Now, within the function I need to increase the size of an array according to the loop index in use. The problem comes when I allocate the … |
|
Re:
First of all, let me just say that, this is the 1st time I have ever programmed in C, so please be gentle :S (although it shouldn't be that bad). With regards to the program, I have been set a scenario to create a sales system where the user enters … |
|
Re:
plz explain how to do this the proper way. [CODE]main.c ===== struct names{ // definitions ----- ---- ---- } struct names x; function1(&x); file2.c ====== function1(struct names *x){ ---- ---- ---- }[/CODE] am getting warning: [B]'struct names' declared inside parameter list[/B] |
|
Re:
hi all. the following is working fine for me char * hex = (..dynamically allocated memory with malloc..); *(hex+0) = 0x43; *(hex+1) = 0x2b; i now have to assign a string in the format 43 2b 1c to the char * array at runtime. anyone did it ? plz guide. |