. Consider the following program
main()
{
int a[5]={1,3,6,7,0};
int *b;
b=&a[2];
}
The value of b[-1] is
(A) 1 (B) 3 (C) -6 (D) none
Answer Posted / gagan
answer is 3
bcz b[0]=6 so b[-1]=3
| Is This Answer Correct ? | 23 Yes | 6 No |
Post New Answer View All Answers
How can you convert integers to binary or hexadecimal?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
How can I change their mode to binary?
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
What is the difference between int main and void main?
Is fortran faster than c?
Explain 'bit masking'?
Are global variables static in c?
Why c language is called c?
Explain what is the difference between the expression '++a' and 'a++'?
What is static memory allocation? Explain
What is an operator?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].