#define a 10
void foo()
{
#undef a
#define a 50
}
int main()
{
printf("%d..",a);
foo();
printf("%d..",a);
return 0;
}
explain the answer
I need your help, i need a Turbo C code for this problem.. hope u'll help me guys.? Your program will have a 3x3 array. The user will input the sum of each row and each column. Then the user will input 3 values and store them anywhere, or any location or index, temporarily in the array. Your program will supply the remaining six (6) values and determine the exact location of each value in the array. Example: Input: Sum of row 1: 6 Sum of row 2: 15 Sum of row 3: 24 Sum of column 1: 12 Sum of column 2: 15 Sum of column 3: 18 Value 1: 3 Value 2: 5 Value 3: 6 Output: Sum of Row 1 2 3 6 4 5 6 15 7 8 9 24 Sum of Column 12 15 18 Note: Your program will not necessary sort the walues in the array Thanks..
#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d..%d",*p,*q); }
Finding a number which was log of base 2
#include<stdio.h> main() { FILE *ptr; char i; ptr=fopen("zzz.c","r"); while((i=fgetch(ptr))!=EOF) printf("%c",i); }
main() { int i=400,j=300; printf("%d..%d"); }
main() { char a[4]="HELLO"; printf("%s",a); }
main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }
29 Answers IBM, TCS, UGC NET, Wipro,
code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123
#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);
main() { char p[ ]="%d\n"; p[1] = 'c'; printf(p,65); }
main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }