Write a single line c expression to delete a,b,c from aabbcc
Answers were Sorted based on User's Feedback
Answer / shirley
in arrays:
char a[6]="aabbcc";
for(i=0;i<3;i+=2)
a[i]=a[i+2];
a[i+1]='\0';
using pointers:
*s="aabbcc"
for(i=0;i<3;i++)
*(s+i)=*(s+i+2);
*(s+i+1)='\0';
Is This Answer Correct ? | 10 Yes | 7 No |
Answer / arihant jain
printf("%s\b\b\b\b\b\b \b\b\b\b\b\babc","aabbcc");
Is This Answer Correct ? | 5 Yes | 2 No |
main() { int i; i = abc(); printf("%d",i); } abc() { _AX = 1000; }
How we print the table of 3 using for loop in c programing?
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }
hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?
Write a routine that prints out a 2-D array in spiral order
posted by surbhi just now main() { float a = 5.375; char *p; int i; p=(char*)&a; for(i=0;i<=3;i++) printf("%02x",(unsigned char) p[i]); } how is the output of this program is :: 0000ac40 please let me know y this output has come
struct aaa{ struct aaa *prev; int i; struct aaa *next; }; main() { struct aaa abc,def,ghi,jkl; int x=100; abc.i=0;abc.prev=&jkl; abc.next=&def; def.i=1;def.prev=&abc;def.next=&ghi; ghi.i=2;ghi.prev=&def; ghi.next=&jkl; jkl.i=3;jkl.prev=&ghi;jkl.next=&abc; x=abc.next->next->prev->next->i; printf("%d",x); }
write a program to count the number the same (letter/character foreg: 's') in a given sentence.
main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
All the combinations of prime numbers whose sum gives 32
what is brs test reply me email me kashifabbas514@gmail.com
What is "far" and "near" pointers in "c"...?