can u give me the c codings for converting a string into
the hexa decimal form......
Answer / ravi jaiswal
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char x[25];
int i=0;
printf("Enter a string");
gets(x);
while(x[i]!='\0')
{
printf("%x\t",x[i]);
i++;
}
getch();
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Printf can be implemented by using __________ list.
Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)
main() { char str1[] = {‘s’,’o’,’m’,’e’}; char str2[] = {‘s’,’o’,’m’,’e’,’\0’}; while (strcmp(str1,str2)) printf(“Strings are not equal\n”); }
print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!
35 Answers Tata Elxsi, TCS, VI eTrans,
How will u find whether a linked list has a loop or not?
Is the following code legal? struct a { int x; struct a b; }
void ( * abc( int, void ( *def) () ) ) ();
how to swap 3 nos without using temporary variable
main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }
#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }
main() { char *str1="abcd"; char str2[]="abcd"; printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd")); }
Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?