What is the difference between declaring a variable by
constant keyword and #define ing that variable?
Answer / ganesh
constant- it cannot be changed
# define - it can be changed if we can redefine
Is This Answer Correct ? | 2 Yes | 0 No |
consider the following C code main() { int i=3,x; while(i>0) { x=func(i); i--; } int func(int n) { static sum=0; sum=sum+n; return(sum); } the final value of x is
what is the difference between these initializations? Char a[]=”string”; Char *p=”literal”; Does *p++ increment p, or what it points to?
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
What is a macro, and explain how do you use it?
f(x,y,z) { y = y+1; z = z+x; } main() { int a,b; a = 2 b = 2; f(a+b,a,a); print a; } what is the value of 'a' printed
write a string copy function routine?
What are register variables? What are the advantage of using register variables?
find the output of the following program main() { int x=5, *p; p=&x; printf("%d",++*p); }
#include<conio.h> #include<stdio.h> void main() { int i; if(1,0,2,3) { printf("if"); } else { printf("else"); } getch(); } Can any body tell the answer of this question with explanation?
How many loops are there in c?
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
Print all numbers which has a certain digit in a certain position eg: number=45687 1 number=4 2 number=5 etc