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 |
PROG. TO PRODUCE 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
main() { 41printf("%p",main); }8
main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }
how to delete an element in an array
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }
Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
main( ) { char *q; int j; for (j=0; j<3; j++) scanf(“%s” ,(q+j)); for (j=0; j<3; j++) printf(“%c” ,*(q+j)); for (j=0; j<3; j++) printf(“%s” ,(q+j)); }
#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d..%d",*p,*q); }
main() { int *j; { int i=10; j=&i; } printf("%d",*j); }
Write a program to print a square of size 5 by using the character S.
Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like.
21 Answers ABC, eBay, Goldman Sachs, Google, HUP, Microsoft, TATA,
Write a C function to search a number in the given list of numbers. donot use printf and scanf