WRITE A PROGRAM TO PRINT THE FOLLOWING OUTPUTS USING FOR LOOPS. A) * B) ***** *** * * ***** * * *****
2 15757Write an implementation of “float stringToFloat(char *str).” The code should be simple, and not require more than the basic operators (if, for, math operators, etc.). • Assumptions • Don’t worry about overflow or underflow • Stop at the 1st invalid character and return the number you have converted till then, if the 1st character is invalid return 0 • Don’t worry about exponential (e.g. 1e10), instead you should treat ‘e’ as an invalid character • Write it like real code, e.g. do error checking • Go though the string only once • Examples • “1.23” should return 1.23 • “1a” should return 1 • “a”should return 0
6 10812a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
TCS,
2157How can I prevent other programmers from violating encapsulation by seeing the private parts of my class?
1 3854
What is c method?
What is void main ()?
how can I convert a string to a number?
what is the difference between class and unio?
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
How macro execution is faster than function ?
Why & is used in c?
Why c is a mother language?
What will be the outcome of the following conditional statement if the value of variable s is 10?
What are the preprocessor categories?
write a progrmm in c language take user interface generate table using for loop?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
What is the most efficient way to store flag values?