19,876 Topics

Member Avatar for
Member Avatar for rithish

what is determinanat of matrix i have a code i dont understand what is the logic behind

Member Avatar for sepp2k
0
116
Member Avatar for MasterHacker110

In C++ you have this: std::string = "Name"; You can also read file with it, unlike reading the contents into a char[] with a limited amount of memory. So whats is C equivalent of a C++ string?

Member Avatar for MasterHacker110
0
3K
Member Avatar for priya.chitroda

Write a computer program using the C Language which reads any base-10 number from the standard input (keyboard) and writes its binary and hexadecimal representation to the standard output (monitor). this is what I have and I am super confused and need help please. and I have to create this …

Member Avatar for WaltP
0
242
Member Avatar for dlmagers

I am trying to figure out how to create a C++ program that has a Subtotal and a Grandtotal. Could someone please help start a program? It has to have a selection and repetition structure in it.

Member Avatar for phorce
0
758
Member Avatar for Qonquest

I am getting this output: This is the source string╠This is a destination string╠╠╠╠╠╠╠╠╠╠╠╠╠╠5Press any k ey to continue . . . My code is: void Problem5(char strDestination [], char strSource []) { int intIndexOfStrSource = 0; int intConcatenatedStringIndex = 0; int intStringDestinationIndex = 0; int intLengthOfDestination = strlen(strDestination); int …

Member Avatar for deceptikon
0
1K
Member Avatar for Hammad Akhtar

#include<stdio.h> #include<string.h> int compare_string(char *first, char *second) { while(*first==*second) { if ( *first == '\0' || *second == '\0' ) break; first++; second++; } if( *first == '\0' && *second == '\0' ) return 0; else return -1; } int main(void) { char string[1000]; char word[20]; char *s; int len; …

Member Avatar for Ancient Dragon
0
144
Member Avatar for joey_r

Hello everyone, I'm new to C and was hoping ya'll could review my code. It is a simple workout program that prints a list of exercises into a .txt file. The major bug is in main.c line 18 and the generateProgram function in boxing_functions.c line 57. I'm still learning pointers …

Member Avatar for WaltP
0
119
Member Avatar for mchung90

Hello, I was curious to how I would go about modifying an existing text file (to all upper case) by the use of mapped memory. I think I have done the mapping correct, however I am stuck on how to modify the file. Help would be much appreciated, thanks! #include …

Member Avatar for mchung90
0
140
Member Avatar for rithish

#include <stdio.h> #include <stdlib.h> void main() { int a[400],n,i; printf("enter the no of elements: "); scanf("%d",&n); printf("enter the no: "); for(i=0;i<n;i++) { scanf("%d",&a[i]); } n=n+1; printf("enter the no: "); scanf("%d",a[n]); for(i=0;i<n;i++) { printf("%d",a[i]); } } i inserted elements after that i again inserted its not working.it shows 0 errors but …

Member Avatar for sfuo
0
90
Member Avatar for hackit

I am learning C. After completing the common core part. I found this unique program which will allow the user to create his own format specifier which will use "%b" as format specifier to convert a integer directly into binary. I want to know more about this code. How it …

Member Avatar for lil_bit
0
396
Member Avatar for salohcin

i having problem saving a txt file and printing it back out , i have the hints of using fgets(v[i],14,infile); and sscanf(v[i],"%d: %s %s,%x"%line_num[i],inst[i],reg[2],reg2[0]); i have no idea on how to imply this correctly can someone show me a correct implemtation of the code so i can move forward to …

Member Avatar for salohcin
0
211
Member Avatar for I_m_rude

int main() { float i=0.3; ....... ........ if(i<0.3) printf("ishq\n"); else printf("hello\n"); return 0; } hi, can anyone please explain why i am getting output as "ishq" even if i=0.3 so if condition must be false. pleas help i am not getting it. thanks.

Member Avatar for Banfa
0
204
Member Avatar for musicman432

So I'm trying to write this program in C that will take a message the user types in and encrypt it using an RSA public key that the user supplies. I know there are encryption functions and libraries in C but I want to actually recreate the algorithm in code …

Member Avatar for sccdqx
0
298
Member Avatar for ricardo.crudo

This below code is the code minimized of real code. Is posible synchronize a global variable with pthread and main while(1)? On the below code, the printf not apper in order and delayed of the 1 second. #include <pthread.h> #include <stdio.h> pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; int teste; void *ThreadFunc(void *arg) …

Member Avatar for L7Sqr
0
213
Member Avatar for Rubinder singh

I need a code which can solve the equations like this :- 56*78+(78/8) In this we know that brackets must be solved first and then divide/multiply and then add/subtract. So, i need a code for solving this kind of equations which contains multiple operators in single line. Thnks :)

Member Avatar for Rouf mir
0
303
Member Avatar for on93
Member Avatar for Tajinderpal
0
230
Member Avatar for I_m_rude

hi, My question is about the const keyword. union emp { char name[]; int age; float salary; }; const union emp e1; int main() { strcpy(e1.name,"H"); printf("%s",e1.name); e1.age=45; printf("%d",e1.age); printf("%f\n",e1.salary); return 0; } I know this code has error which is that "cannot modify constant objects". But Can anyone tell …

Member Avatar for I_m_rude
0
136
Member Avatar for I_m_rude

hi, int a[][2]={1,2,3,4}; int *p[]={(int*)a,(int*)a+1, (int*)a+2}; for(i=0;i<2;i++) for(j=0;j<2;j++) printf("%d ",*(*(p+i)+j)); Firstly, This is part of any code. And i want to ask that in *p[] definition, why it is written (int*) with every element since a is already an pointer. Secondly, when I am accessing *(*(p+1)+1) element in loop, then …

Member Avatar for I_m_rude
0
126
Member Avatar for Vish0203

How to define multiple characters using macros?? I want to declare all the hexadecimal digits under a name "hexa". Does anyone know it how to do that?? The below code is wrong! Any suggestions to make it correct?? #define hexa 'A','B','C','D','E','F','0','1','2','3','4','5','6','7','8','9' #include<stdio.h> int main() { char a; printf("Enter a character= …

Member Avatar for Vish0203
0
137
Member Avatar for shanki himanshu

Why the program is running without line 14? #include<stdio.h> #include<iostream> //#include<conio.h> //#include<math.h> #define FOR(i,a,b) for(int i=a;i<b;i++) using namespace std; int main() { int a[]={1,2,3,4,5,6,7,8,9,10}; int *b; //b=(int *) malloc(sizeof(a)); b=a; //cout<<b; FOR(i,0,10) cout<<b[i]<<" "; //cout<<sizeof(b); //getch(); return 0; }

Member Avatar for shanki himanshu
0
100
Member Avatar for joey_r

Hey ya'll I was looking for some guidance. I'm building a "workout generator" for fun and got stuck. I want my program pick a random assortment of exercises and write them to a new file. What is the best way to randomly pick strings from a list of exercises; jump …

Member Avatar for joey_r
0
87
Member Avatar for I_m_rude

hello, I am learning C from past 1 year, Now, I want to improve my coding skills by learning techniques like dynamic programming, backtracking and all that stuff. Can u please tell me or give me links from where i can learn, practise and improve these skills ? please help …

Member Avatar for I_m_rude
0
108
Member Avatar for laavanya

what kind of concepts must be taken up for mini projects by students,especially for their first project...??please reply...

Member Avatar for laavanya
0
212
Member Avatar for daino

If I write a C++ program and compile it into an executable file AND, don't have to install the program, will I have trouble running that C++ written program on other platforms? Do portability issues accross different platforms only arise when I have to install the program? I'm currently breezing …

Member Avatar for deceptikon
0
345
Member Avatar for XodoX

I'm having difficulties writing the rpc function. Specifically, I don't know how to pack a function name and input argument into a message body, send the message, set and unpack reply, and return result and error code. I know how to create the socket, request aconnection from the server etc. …

Member Avatar for XodoX
0
167
Member Avatar for Vectorizm

I know it's a bad practice to post the same question on more than one help site (I posted it on Stackoverflow, but after some time your question loses its place on the "active" list and people stop reading it) but I'm really desperate here. So my question is: I …

Member Avatar for Vectorizm
0
399
Member Avatar for silvercats

#include <iostream> using namespace std; int answer(int x,int y); //function proto int mutab[10][12]; //two dimentional array declaration int main() { for (int i=0;i<1;i++) //this will fill 1-10 of the multiplication table { for (int h=0;h<10;h++) { mutab[h][i]=h+1; } } for (int i=0;i<10;i++) //this will fill 1x1,1x2,1x3 etc.. to ......10x11,10x12 { …

Member Avatar for silvercats
0
247
Member Avatar for rithish

i would like to start data structures in c langauage.but i dont know even what is data structure and 0% about data structure.can u suggest me some books for data structure in c?????

Member Avatar for rubberman
0
117
Member Avatar for cse.avinash

I am doing following code to get the output upto 5 decimal characters of any number inputted by user when divided by 1, I have to use typecast it with (float) , can any one tell me how this can be done without typecasting or using float constant.. int main() …

Member Avatar for cse.avinash
1
180
Member Avatar for Dave Sinkula

While not terribly difficult, first timers may not know the functions to look up and use. Here is some basic code for reading a file one line at a time. The contents of the file are printed to the stdout.

Member Avatar for 'CoffeeLike
2
61K
Member Avatar for Vish0203

I have a problem, actually I want the software i created, to be little private. Hence, I thought of using MAC address, but I'm Unable to retrive the MAC address using C. I surfed on the internet and found the code to retrieve MAC address in LINUX, but i want …

Member Avatar for gregha04756
0
68
Member Avatar for hackit

I want to learn how to use preprocessor #pragma in C? can anyone please help me to understand..

Member Avatar for Ancient Dragon
0
97
Member Avatar for ashine80
Member Avatar for sandeepalankar

Hi, I have a problem in data structures I am stuck in this one .Please try to help me. Question : A man Joe has a habbit of eating pancakes & driving bikes.Once he went for outside by his bike,now he is EXACTLY IN THE MIDDLE OF A ROAD his …

Member Avatar for WaltP
0
181
Member Avatar for gem.gonzales.9

Please help me to make a program in turbo c that will let you guess the password. but if it is wrong the program will ask you do you want to continue y or n ,if y it will display again what is the password if no end the program

Member Avatar for WaltP
0
160
Member Avatar for I_m_rude

hi, 1. actually i was reading some text from my book and i come across this expression. I am not getting what it means. here it goes, typedef int (*HIG) (int,int); And "sizeof" can't be used in #if because the preprocessor does not parse type names. What this statement means …

Member Avatar for Perry31
0
116
Member Avatar for rajshrimohanks

I came across [this](http://www.daniweb.com/software-development/cpp/threads/189901/screen-capture-program) program in the C++ section. How to do something similar in C? Let me elaborate. I want to read the colour values of individual pixels in at the rate of at least about 25Hz. I have a nVidia GeForce GTS450 graphic card and Windows 7 64-bit/Linux …

Member Avatar for rajshrimohanks
0
2K
Member Avatar for iamnot

Sample Input: 20 10 2 5 2 Sample Output: 2 Explanation: An amount of 20 could be made in 2 ways: 10*2 10*1 + 5*2 I want to find out the number of ways a particular amount can be made with given coins.In the sample input 20 is the amount …

Member Avatar for sepp2k
0
137
Member Avatar for benjaminpelc

Hi, I am trying to write code to read a text file containing velocity vector data in the form x, y, u, v. An example of the data file I am opening is: 0 1.0 3.24 45.64 1.5 2.5 54.34 23.45 ... I have a function which can read the …

Member Avatar for benjaminpelc
0
274
Member Avatar for RReddy1

Hi, Can anyone help me out in the below issue. My requirement is,,i have to take an xl sheet as input in the program with 2 columns student name,student address and some 20 number of rows for each column. i have to take another input file also i.e a log …

Member Avatar for Perry31
0
85
Member Avatar for VasquezPL

I have a very strange problem...I have a function which works in 99/100 times...But unfortunately I have noticed one group which generates me some problems. The worst thing is that I don't see anything special in it...name is nomral, I have access to list it...But my program doesn't return any …

Member Avatar for VasquezPL
0
705
Member Avatar for BHKK

Hi, I got a problem in reading and write on file. I have to create an virtual agenda, therefore I enter a name and a number for N persons. After entering the infos if the file doesn't exist, the program create it and save the infos, if the file exist …

Member Avatar for Ancient Dragon
0
177
Member Avatar for mrgadgets

What c framework are you people using to develop a game written totally in c? Mind to share?

Member Avatar for DeanMSands3
0
166
Member Avatar for sebass123

Im not really sure where my program has gone wrong and would be thankful for any help provided. It compiles and runs up until the first function is called then crashes however I have tried multiple ways to fix it such as different names, changing the return values, changing the …

Member Avatar for Perry31
0
124
Member Avatar for mrgadgets

Let say you have came out with a software written in c is there anyway to insert a clickable icon on your desktop so you can run the program on windows desktop? c is very good but we need to get a clickable icon so we can run our software.

Member Avatar for Ancient Dragon
0
112
Member Avatar for sebass123

I am having trouble compiling this program, I have just about everything written up but the compiler errors are keeping me stuck at a standstill. In the WRITEARRAY and READARRAY function are where the main compile errors are giving me subscript is not of integral type and this is making …

Member Avatar for sebass123
0
118
Member Avatar for Samyx

I need help writing a c program to run in Unix that uses pthread library to create a thread that computes the fibonacci numbers. I should provide a parameter to the thread indicating which fibonacci number to return and use pthread_join to wait and collect the returned value and lastly …

Member Avatar for DeanMSands3
0
3K
Member Avatar for khezel nicole

help how to make a flowchart that will input a grade of a student and determined whether the grade is pass or failed.print the name,grade,and remarks of a student

Member Avatar for phorce
0
45
Member Avatar for ashish karna

HI, how can i integrate these both code mentioned below so that the output displayed on the black edit box must be as:(2+2)/2+2*3=8 here is the code of BODMAS calculation: #include <stdio.h> int calc(char *exp_str){ FILE *fp; int ret; fp=fopen("calc_aux.c","w"); fprintf(fp, "int main(){ return %s; }", exp_str); fclose(fp); system("gcc calc_aux.c …

Member Avatar for TrustyTony
0
176
Member Avatar for bob855

Hi, I am new to C#. Can someone possibley help me? I have gone through the msdn site and i am still lost:/ I have a form with a few buttons. QUESTION1 Button1 I want to move and replace a folder. If the folder exists its replaced by the new …

Member Avatar for Ketsuekiame
0
110

The End.