main( )
{
int a[ ] = {10,20,30,40,50},j,*p;
for(j=0; j<5; j++)
{
printf(“%d” ,*a);
a++;
}
p = a;
for(j=0; j<5; j++)
{
printf(“%d ” ,*p);
p++;
}
}
Answer / susie
Answer :
Compiler error: lvalue required.
Explanation:
Error is in line with statement a++. The operand must be an
lvalue and may be of any of scalar type for the any
operator, array name only when subscripted is an lvalue.
Simply array name is a non-modifiable lvalue.
Is This Answer Correct ? | 9 Yes | 1 No |
main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }
Display the time of the system and display the right time of the other country
main( ) { static int a[ ] = {0,1,2,3,4}; int *p[ ] = {a,a+1,a+2,a+3,a+4}; int **ptr = p; ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *++ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); ++*ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); }
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
write a c program to Create a mail account by taking the username, password, confirm password, secret_question, secret_answer and phone number. Allow users to register, login and reset password(based on secret question). Display the user accounts and their details .
how can u draw a rectangle in C
53 Answers Accenture, CO, Codeblocks, Cognizant, HCL, Oracle, Punjab National Bank, SAP Labs, TCS, University, Wipro,
What is "far" and "near" pointers in "c"...?
code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123
main(){ int a= 0;int b = 20;char x =1;char y =10; if(a,b,x,y) printf("hello"); }
Write a procedure to implement highlight as a blinking operation
#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }
4 Answers Google, HCL, Quick Heal, WTF,