What does "scanf("%d",&a[i])" mean? [closed] - c

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 5 years ago.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Improve this question
First time seeing this, what does this mean? Specifically the &a[i] part.
scanf("%d",&a[i])

This looks like C code that has been converted to HTML entities, so that it can be displayed on a web page. & is how you enter an & character in HTML. If you look at it in a web browser you'll see the intended C code, which is
scanf("%d",&a[i])
&a[i] means the address of the ith element of the array a. So this reads an integer from standard input, and stores it in a[i].
Don't try to read C from the HTML source code.

Related

Why can't I use the ^ operator in C? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
Is the ^ operator available in the C language? I have tried using it but it gives a faulty output.
Does it denote raising an integer to the power of something
It works just fine and means bitwise XOR. That is, 1^2 gives 3.
Unfortunately C doesn't provide a function to take power of integers. This is a known flaw of the language. You have to roll out such a function yourself either by using multiplication in a loop, or use the slow floating point function pow.

TSQL: I have one basic querying problem qr [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
Query:
DECLARE #Patd_base nvarchar(50) = '‪axx';
PRINT #Patd_base
Output is
?axx
Why is the ? in the output? What does it mean?
Thanks for the help!
I believe you copied and pasted the value 'axx' from elsewhere. It has a hidden extended character in it.
When I copy/pasted your command above into Notepad++, and converted to ANSI encoding, I got '‪axx'

Broken bar (¦) as OR operator in "The C Programming Language" book [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
EDIT: Sorry, I accidentally submitted the question before I was done. Boy, are you guys quick!
I've been going through the second edition of The C Programming Language and noticed that the book uses broken bars instead of pipes. Was this an old notation or are they interchangeable?
Its a font problem, most of the books show it as broken pipe even though it is the pipe operator
Boolean OR operator. It will set all bits true that are true in either of both values provided.
if ( a==0 || b==3 )
if any one of these is true the "if" statement will execute because it looks for true or
false values.

How to change/fake the 'file size' [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have a file named "abc.mp4" its of 2 GB, i want a program that will conver it size to 6GB keeping the original video, Is there any method to do this like adding useless bytes at end of video?
try this
RandomAccessFile r = new RandomAccessFile(path, "rw");
r.setLength(6L * 1024 * 1024 * 1024);
r.close();
The Answer above is Good, But this Tool did my job very easily and perfectly!
https://sourceforge.net/projects/filesizefaker/

Tool to explain C code [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I remember from some time ago reading about a commandline tool that explains C code, does anyone know what it might be named?
Perhaps you mean cdecl, a program that can translate complicated declarations to English and back?
e.g.
cdecl> explain int (*(*foo)(int ))(float )
declare foo as pointer to function (int) returning pointer to function (float) returning int
If you mean explaining then I think the answers already been given. If you mean looking for potential problems then there's lint and its variants, first stop in any code review.
http://en.wikipedia.org/wiki/Lint_programming_tool
Edit:
C/C++ Free alternative to Lint?
HTH

Resources