write a program in c to find out the sum of digits of a
number.but here is a condition that compiler sums the value
from left to right....not right to left..
Answer / sorab aggarwal
#include<conio.h>
#include<stdio.h>
void main()
{
int a,b,c,d,e;
a=10;
b=20;
c=30;
d=40;
e=(((a+b)+c)+d);
printf("the sum of no. is ::",e);
}
Is This Answer Correct ? | 1 Yes | 1 No |
int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15
How do you initialize function pointers? Give an example?
Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers
Is reference used in C?
Explain how can I right-justify a string?
What is the difference between null pointer and wild pointer?
What is the scope of static variables?
What is the use of #define preprocessor in c?
Explain what is the benefit of using enum to declare a constant?
Explain the difference between struct and union.
What is a void pointer? When is a void pointer used?
#‎include‬<stdio.h> void main() { int i; for(i=5;0;i++) { printf("%d",i); } }