15,552 Topics
| |
I am trying to copy the column, from bottom to top element,to the row , but it does not work. Plase help #include <stdio.h> int main () { int Image1[3][3]={{1,2,3},{4,5,6},{7,8,9}}; int Image2[3][3]; int i= 3; int j =3; int k =0 ; int l; while ( k <= 0){ i=0; … | |
Where can i download the various header files for dev c? sys/types.h sys/socket.h netinet/in.h arpa/inet.h and also structure sockadder and it's derivatives | |
Hi guys, So i wrote a little code, not fancy, to convert a signed decimal to its binary representation using two complements. char immeStr[17]; int main(){ int neg = 0; int i = 0; int bit = 6; char binaryNum[bit+1]; int z1[bit+1]; int temp = -30; int k; int cout … | |
#include <stdio.h> int main(void) { int ten = 10; int two = 2; printf("Doing it right: "); printf("%d minus %d is %d\n", ten, 2, ten - two ); printf("Doing it wrong: "); printf("%d minus %d is %d\n", ten ); // forgot 2 arguments return 0; } hello actually i coulnt … | |
suppose the input is 1,2,3,5-14,16-20,-25,31- :the program must print output: 1 2 3 5 6 7 8 9 10 11 12 13 14 16 17 18 19 20 0 1 2 3 ...........25 31 32 33..... til end of file I WAS REJECTED FROM MY LAST ROUND OF INTERVIEW BECAUSE … | |
I am having problems with pointers and i am getting two errors saying "invalid argument type of 'unary *'" float getProfit(float* bushels, float price) { int i = 0; for(i = 0; i < 20; i++); { *bushels[i] = *(bushels[i]*price); } return 0; } any ideas on a solution? i … | |
i want to print a 'double' variable upto 8 decimal places without trailing zeroes. for eg: if a= **10.1234** then print **10.1234** if a= **10.00** then print **10** if a= **10.11111111111** then print **10.11111111** (max of 8 decimal places). how to do it? i searched for it and found this: … | |
I understood that when you pass the name of the array as an argument to a function we are actually passing the base address of the array, which inturn gets collected by a pointer variable and thus s[i]=*(s+i)=*(i+s)=i[s]. The problem begins when we turn to 2-D arrays. When we want … | |
My questions are how to find the nth prime number? I have figured out how to find a list prime numbers. I'm just stuck as for being able to change my code to only print out the, say, 15th, or 500th prime not every previous prime as well. Any help/feed … | |
Hi. Nice to meet you. I'd like to know if I'm doing the allocation of memory from data to new_data correctly and why new_data only has one value since the memory of data was copied before to new_data. set size: 10 set[000] = 000 set[001] = 001 set[002] = 002 … | |
is `char** val` the same as `char* val[ ]` when is the formal ( `char** val`) used | |
**Write a C program for an automatic teller machine that dispenses money. The user should enter the amount desired (a multiple of 1000 naria) and the machine dispenses this amount using the least number of bills. The bills dispensed are 1000s, and 500s. Write a function that determines how many … | |
Hi guys. I would like to ask several questions about this. Im on my final phase of the proj, will appreciate some information. Qn 1: How do i make the user continually input till he types 'exit' to exit? Qn 2: If he types wrongly, or database couldnt find the … | |
To Check the Given Triangle is Isocles , Equilateral or Right Angled Triang | |
int x = 0; int i,j,p; int buf[4]; int *array[5] = {0}; for (j = 0; j < 3; j++){ for (i = 0; i <4; i++) { buf[i] = x++; } array[j] = buf; } int* temp; temp = array[1]; for (i = 0; i<4; i++) { printf("%d\n", *temp); … | |
How to accept strings and print then them please explain me with example if possible Thanks in advance ............. | |
hellow im am studen of the 4th sem information technology i wann a made a project in c turbo.how can i made | |
hello, I am working on a project that involves a bit of directory manipulation. Until now i only had to create create directories as per user input, so till now the commnad mkdir worked fine: mkdir("c:/test"); But now i have to do some manipulations on the string to get the … | |
Is it possible to convert a postfix expression to prefix expression using only recursion? If possible what's the algorithm? | |
Hi, I have given a task to write a code about approximate of pi. this is what I wrote from the other example. the task is to : (pi^2)/16 = ((-1)^k)/k+1 (1+1/3+1/5+...+1/(2k+1)) Write a program which computes and prints an approximation of pi using a finite number of terms from … | |
i have put one FUNCTION (Display) in the code's but still not functional is there any way by which we can convert BCD to DEC code's and can be printed out as output I know its wrong please help me to make it right thanks [ the CODE's is for … | |
This code is crashing, please tell me for what all I need to assign memory. Thanks #include<stdio.h> #include<conio.h> #include<stdlib.h> struct s1 { char *p1; }; struct s2 { struct s1 *p2; }; struct s3 { struct s2 *p3; }*p4=NULL; int main() { char a='a'; p4=malloc(sizeof(struct s3)); p4->p3->p2->p1=&a; printf("%c",*(p4->p3->p2->p1)); return 0; … | |
Hi, can you help me please? how to make a program where you can enter the usrnme, then enter the paswrd, but the paswrd will be written in asterisk and only read afer pressing ENTER; if usrnme is correct and pass is correct, it will say "welcome" if usrnme is … | |
I want to write a program in C that will take a .wav file as an input and will output a C array i.e. raw PCM samples. I know the bitrate and have other information about the .wav file beforehand and I just want the PCM samples. The PCM samples … | |
Firstly, i'm really new to all this bash/unix/c stuff so i will probably get some words meanings wrong here, but anyway: Im trying to make a client pass simple shell commands to the server, which executes them. They communicate locally on the same machine through a socket. I can make … | |
**Algorithm** step1: display 3 choices step2: user inputs one choice step3: Choice is store in one variable step4: selected choice is transfered to switch function step5: choice is compare to cases step6: a text document is created stating you choice. **This is layout of the code:** #include<stdio.h> void main() { … | |
Hey guys i have a small problem i would love some advice..this code outputs a hollowed box the problem is i cant get the right most column of the box in the right postion without tabbing it across..which will create problems if i want the user to determine how big … | |
#include<conio.h> #include<stdio.h> #include<string.h> int mistakes_ctr=0; int x=52, y=22, i; void printM(){ gotoxy(20,20); cprintf("m"); } void printP(){ gotoxy(22,20); cprintf("p"); } void printL(){ gotoxy(24,20); cprintf("l"); gotoxy(34,20); cprintf("l"); } void printA(){ gotoxy(26,20); cprintf("a"); } void printN(){ gotoxy(28,20); cprintf("n"); } void printT(){ gotoxy(30,20); cprintf("t"); } void printO(){ gotoxy(32,20); cprintf("o"); gotoxy(36,20); cprintf("o"); } void printG(){ … | |
Is the sizeof operator in c a compile time or run time operator..Because the following code works fine with a gcc compiler int a; scanf("%d",&a); printf("%d",sizeof(a)); But I found in one of the tutorials thatsizeof is compile time??Can someone please clear the confusion? | |
I have this file 3 10 10 10 0 0 0 0 0 1 1 0 0 1 1 1 1 0 0 0 1 1 and I want to read the first line as intger in X the 2nd line in camp1 the 3rd line in camp2 line 4 … |
The End.