how to multiply two number taking input as a string
(considering sum and carry )
Answers were Sorted based on User's Feedback
Answer / vengat
int i, b;
char a[4] = "63";
for (i = 0;i < 1;i++)
{
b = (a[i] - 48)+(a[i+1]-48);
printf("%d\n", b);
}
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / ravi
char a[3];
int i;
char s[3];
for(i=1;i<=3;i++)
s[i]=a[i]*2;
printf("%s",s[i]);
Is This Answer Correct ? | 5 Yes | 18 No |
I have an array of 100 elements. Each element contains some text. i want to: append a star character to the end of every fifth element remove every second character from every tenth element, and… add a line feed (ascii 10) after the 30th character of every array element whose length is greater than 30 characters.
write a c program to change only the 3rd bit of the particular number such that other bits are not affected.. if bitnum=10(say.. it can be any no..
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
write a programming in c to find the sum of all elements in an array through function.
#include<string.h> void main() { String s1[]={"swathi"}; string s2[]={"maddimsetti"}; s1[]=s[]; printf("%s",s1[]); }
What are static variables in c?
what is unsigened char and what is the difference from char
what is the advantage of function pointer
16 Answers CMC, CS, Freshdesk, L&T, LG Soft, Matrix, TCS,
Explain what are compound statements?
Does c have enums?
what are the advantages of a macro over a function?
Write a code to reverse string seperated by spaces i/p str=India is my country o/p str=aidnI si ym yrtnuoc After writing code, optimize the code