main()
{
static char
names[5][20]={"pascal","ada","cobol","fortran","perl"};
int i;
char *t;
t=names[3];
names[3]=names[4];
names[4]=t;
for (i=0;i<=4;i++)
printf("%s",names[i]);
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
Compiler error: Lvalue required in function main
Explanation:
Array names are pointer constants. So it cannot be
modified.
Is This Answer Correct ? | 15 Yes | 1 No |
how to return a multiple value from a function?
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?
what is the output of the below program & why ? #include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); }
main() { unsigned int i=10; while(i-->=0) printf("%u ",i); }
main() { int i=300; char *ptr = &i; *++ptr=2; printf("%d",i); }
Is this code legal? int *ptr; ptr = (int *) 0x400;
How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com
Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ??
#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
main() { int i; float *pf; pf = (float *)&i; *pf = 100.00; printf("\n %d", i); } a. Runtime error. b. 100 c. Some Integer not 100 d. None of the above
main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024
void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }