Programming questions are off-topic here. Do not ask questions about how to write code in C. However, conceptual questions about computer science are more appropriate. See our help center for the scope of this site.

learn more… | top users | synonyms

0
votes
0answers
20 views

Reading Data From File, Evaluating, And Printing [closed]

First question here. As the title says, I am trying to write a program that reads text from a file. It is attempting to only read letters as the "if" statements line out. I am trying to place the ...
-2
votes
1answer
72 views

What is the difference between the friend class and inheritance consept in C++? [closed]

In C++ ,friend class allows us to inherit the proprieties of one class to another class(es) which is also possible using inheritance. And also in inheritance we can set different levels of privileges ...
2
votes
1answer
35 views

What is this question asking for?-->Test this code, find an error in the program and “construct an instance to demonstrate the error” (in C) [closed]

I am learning the basics of the language C, and so far we have covered up to loops. This question is related to my assignment. The problem is I do not understand what the question is asking. I know ...
1
vote
2answers
62 views

use of C library in operating systems [closed]

I wonder, how is that operating systems make use of libraries as stdio.h if they themselves are the services? I am right? Is the operating system that interacts with the hardware to operations of I/O? ...
0
votes
0answers
66 views

Find the index of minimum number that is greater than key given of a sorted array, does these two functions return same result?

Give an array of integer has been sorted (non-decreasing order), we need find the index of minimum number number that is greater than key given, I wrote two functions, they're identical except the ...
1
vote
0answers
25 views

How is a complied program updatable? [closed]

We all know in the case of web sites, to make update just means opening the code, editing it and saving it. And to view the changes we just have to refresh the browser. But what about in the case of ...
-1
votes
1answer
36 views

Simple error in C [closed]

I cannot determine why the Celsius values in this code are producing rubbish values. (Look at second statement in the first for-loop). CODE: ...
4
votes
1answer
263 views

Is the Syntax of C Language completely defined by CFGs?

I think the Question is self sufficient. Is the syntax of C Language completely defined through Context Free Grammars or do we have Language Constructs which may require non-Context Free definitions ...
7
votes
6answers
4k views

Why do negative array indices make sense?

I have came across a weird experience in C programming. Consider this code: ...
2
votes
2answers
687 views

Handling untrusted string input in printf in C [closed]

I stumbled upon the MSDN Best Practices for Code Review. Under the section “Untrusted Inputs”, I found following which I didn't understand properly. Why is the following considered safe? ...