study the code:
#include<stdio.h>
void main()
{
const int a=100;
int *p;
p=&a;
(*p)++;
printf("a=%dn(*p)=%dn",a,*p);
}
What is printed?
A)100,101 B)100,100 C)101,101 D)None of the
above
Answers were Sorted based on User's Feedback
Answer / jitendra kumar arya
(d),because n treat as a chracter.
ans is 100n ,101n
| Is This Answer Correct ? | 1 Yes | 3 No |
Answer / venkataramani kumar.t.b.
The Answer is C) a=101 and (*p)=101.
Since the variable is not directly accessed and it
increments thru' the pointer, so the answer is valid
| Is This Answer Correct ? | 2 Yes | 5 No |
What is the purpose of sprintf?
while initialization of array why we use a[][2] why not a[2][]...?
What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.
Differentiate between the = symbol and == symbol?
what is the answer for it main() { int i; clrscr(); printf("%d",&i)+1; scanf("%d",i)-1; }
What is the difference between test design and test case design?
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
What is meant by gets in c?
Are c and c++ the same?
Why c language?
How to reverse alternate words in a given line of string For Eg: my name is narasimha output : my eman is ahmisaran