C/Questions

SubjectDate AskedExpert
Graphics related error in turbo c++1/28/2012Prince M. Premnath
  Q: I was trying some graphics under C++ Programming Language. Whenever I compile any program ...
  A: Sorry for the bit of delay in responding your query :( .. but of busy .. fine ... If you didn't get ...
Graphics related error in turbo c++1/17/2012Prince M. Premnath
  Q: I was trying some graphics under C++ Programming Language. Whenever I compile any program ...
  A: Hai Dear Swetha,, Sorry for the bit of delay in responding your question, well I have already ...
Random number always the same.1/6/2012Zlatko
  Q: For some reason I couldn't follow up with the previous question so I had to make a new one. I'm not ...
  A: You see the same value for infected because of this statement: infected = rand()<=Inv_NumofBees ...
Error whilst updating a file1/5/2012Zlatko
  Q: ) I have encountered one final problem with another function in which I need to update my Inventory ...
  A: Every time you call rand() you get a new random number. I thought that was what you wanted. I guess ...
Error whilst updating a file1/5/2012Zlatko
  Q: ) I have encountered one final problem with another function in which I need to update my Inventory ...
  A: You are getting random data in the file because you are not initializing the Inv_ variables. You ...
Reading a specific line in a textfile and later updating it.1/4/2012Zlatko
  Q: I have a textfile containing the following information: Total number of Bees: 15 Total number of ...
  A: In the line which prints to the file you have: Inv_Money-price*numofbees price is a float, so the ...
Reading a specific line in a textfile and later updating it.1/4/2012Zlatko
  Q: I have a textfile containing the following information: Total number of Bees: 15 Total number of ...
  A: At this part: if (fscanf(file, LINE_1, &Numofbees) != 1) /*Checks for the number of bees and the ...
Reading a specific line in a textfile and later updating it.1/3/2012Zlatko
  Q: I have a textfile containing the following information: Total number of Bees: 15 Total number of ...
  A: I'll show you how to read and write the file in C, and I'll let you work on the program calculation ...
algorithm confusing1/2/2012Abhishek Kumar
  Q: , I need some help from you, this is my c coding: main() { int n; int sumn=0; for(n=3; ...
  A: If you see closely you will see that your program is doing something like : sum=6 n=6 sum=15 n=9 ...
Memory allocation12/20/2011Zlatko
  Q: I am facing segmetation fault in c program. I am suspecting below piece of code. char **name = ...
  A: The code you sent me would not cause a seg fault on its own, but I suspect it has some problems. ...
c12/9/2011Zlatko
  Q: 3)sir my doubt is about extern storage class.”when we have a global variable defined in one c ...
  A: You may have gotten the 35 output because you included 1.c into 2.c. That is not how to do it. You ...
Help with pseudocode question12/8/2011Zlatko
  Q: need help with the following question in pseudocode: Design a program that uses the following ...
  A: I see your assignment, but I don't see your question. What is it about your assignment that you are ...
c question12/2/2011Zlatko
  Q: am gettin error when i try to read float type data in array of structures.. the program terminates ...
  A: When I tested your program. It worked well as long as I gave it correct input. If it was asking for ...
c12/1/2011Zlatko
  Q: My doubt is about variable declaration and definition. Int a ; it is declaration of a .no memory ...
  A: When you say int a; it is both declaration and definition, and memory IS allocated for the a. When ...
C programing and data structures12/1/2011Zlatko
  Q: write a c program to add all numbers between 100 and 200 that contain the digit 5.
  A: Here is a hint about how to do it. Create a 'for' loop which counts from 100 to 200 Within the for ...
Return statement / Exit().11/30/2011Prince M. Premnath
  Q: what is the purpose of a return statement/exit() function?
  A: Hai dear Elme, The exit() function stops the program. exit_code is passed on to be the return ...
Follow up - C Function to work in larger program11/28/2011Zlatko
  Q: Zlatko. Thanks you for responding to me so quickly. The sample program worked great. However when I ...
  A: The problem is in the main loop. The comments with my initials (ZM) below explain it. Its a very ...
c storage minimal space11/28/2011Zlatko
  Q: How can i do the following in C: in order to store the string "abcd", i may need 5 bytes( 40 bits). ...
  A: It's an interesting question. I may be off by 1 here and there in my analysis below, but I hope you ...
c storage minimal space11/28/2011Abhishek Kumar
  Q: How can i do the following in C: in order to store the string "abcd", i may need 5 bytes( 40 bits). ...
  A: If you see why we take 1 Byte (8 bits) space for storing a character is because ASCII characters ...
C - Help with finding duplicates in array11/27/2011Zlatko
  Q: Good evening, I hope that you might be able to help me with this. I have a program that finds ...
  A: I would do it like this. Put the checking logic into its own function. The checking function will ...
Here I let you the program,I really need help before tomorrow...THANK YOU11/25/2011Zlatko
  Q: I'm sorry I thought I sent you the message,maybe I did something wrong. Thank you anyway for your ...
  A: Very well, then you should be starting with one parent and one child, and you should get that ...
Here I let you the program,I really need help before tomorrow...THANK YOU11/25/2011Zlatko
  Q: I'm sorry I thought I sent you the message,maybe I did something wrong. Thank you anyway for your ...
  A: What is your program supposed to do? I think this is what you want: The child1 reads a message from ...
Here I let you the program,I really need help before tomorrow...THANK YOU11/25/2011Zlatko
  Q: I'm sorry I thought I sent you the message,maybe I did something wrong. Thank you anyway for your ...
  A: I promise to take a closer look at your program tonight when I have time. For now I have 2 concerns. ...
output of a program.11/23/2011Zlatko
  Q: sir, please give me output of following code:- int *a, b=30; &b=1000; a=&b; b=b-5; *a=*a+b; *a=b-10; ...
  A: You need to trace through the program line by line and write down what is happening. For example: ...
output of a program.11/23/2011Zlatko
  Q: sir, please give me output of following code:- int *a, b=30; &b=1000; a=&b; b=b-5; *a=*a+b; *a=b-10; ...
  A: The code is incorrect. You cannot say &b=1000; It is like saying "the address of b is 1000". The ...
c11/23/2011Zlatko
  Q: i know the storage classes.but i am not able to identify the difference between life and scope of a ...
  A: In C all variables are either local or global. Global variables are ones which are declared ...
Regarding program11/22/2011Zlatko
  Q: I want to ask a question regarding a program.Please help me out of this.i want you to resolve this ...
  A: If you have 2 expressions, separated by a comma, like this: e1,e2 the program first evaluates e1, ...
Help needed to write a program in c11/18/2011Abhishek Kumar
  Q: I need to write a c program to remove duplicates from a file. I have a wordlist.txt file with ...
  A: Till now you program looks good. In the end you are copying the entire file into the buffer. Now you ...
array11/17/2011Abhishek Kumar
  Q: i would very much appreciate it if i could get a response from you today. i am new to this site and ...
  A: I have written code for you but from next time i want you to at least try before asking. And for ...
C arrays11/12/2011Zlatko
  Q: I have a problem and I don't know how to explain it. I have a projects and it uses a -1 index, like ...
  A: It's possible to have a -1 index. The compiler will accept it but it is not a good idea. I would say ...
program not running right way11/12/2011Kedar Desai
  Q: #include<conio.h> #include<stdio.h> #include<process.h> #include<alloc.h> #include"dos.h" // for ...
  A: whenever we put ; after the for statement it executes the statement block whenever condition goes ...
program not running right way11/11/2011Kedar Desai
  Q: #include<conio.h> #include<stdio.h> #include<process.h> #include<alloc.h> #include"dos.h" // for ...
  A: There is a syntax error while writng calloc function. Calloc function always takes 2 parameters. One ...
arrays of different sized elements11/9/2011Kedar Desai
  Q: I'd want to know if there is any way in C to do the following/ -create an array with different sized ...
  A: No, in C each element of an array have to be of the same type (and thus the same size as well). I ...
Multiple page output11/7/2011Kedar Desai
  Q: I am coding a program which keeps record of all employees of an organization. There is an option to ...
  A: Sir, I don't know about multiple pages in C. But, You have another option for this is to show 5 ...
Making a character bright in C10/31/2011Zlatko
  Q: I have a problem in C. I am coding a menu driven program that has four options in the main menu: Add ...
  A: There is no specific way of doing this in C or C++. It will depend on the operating system you are ...
c10/30/2011Kedar Desai
  Q: #error is used to display user defined messages during compilation of a programme. This is my ...
  A: #error produces compile time error messages. Syntax: #error token_string The error messages include ...
C10/30/2011Kedar Desai
  Q: write a program to find roots of a quadratic equation.
  A: #include<stdio.h> #include<math.h> void main() { int a,b,c; float d,p,q,r,s; printf("\n\n Enter ...
c10/30/2011Zlatko
  Q: Sir #error is used to display user defined messages during compilation of a programme. This is my ...
  A: The purpose of #error is to tell the programmer that some condition necessary for compiling has not ...
Fibonacci Sequence10/23/2011Zlatko
  Q: How to print Fibonacci Sequence using loop and function? Can I install Turbo C/C++ on Windows 7? Is ...
  A: I've made a video for you to show you how to get started with Visual Studio. I'm sure you can find ...
Fibonacci Sequence10/22/2011Zlatko
  Q: How to print Fibonacci Sequence using loop and function? Can I install Turbo C/C++ on Windows 7? Is ...
  A: I don't know anything about how to find or install turbo C. I do know that it is a very old compiler ...

Page:   1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10  |  Next      All

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Zlatko

Top Expert on this page

Expertise

I can answer questions about C / C++ programming, software design, algorithms, and interprocess communication. I have access to Microsoft Visual Studio and gcc as my development platforms.

Experience

I have been developing software professionally for UNIX and Microsoft Windows since 1991.

Education/Credentials
I have a Bachelor of Applied Science in Computer Engineering from the University of Waterloo located in Waterloo, Ontario, Canada.

©2012 About.com, a part of The New York Times Company. All rights reserved.