main()
{
register int a=2;
printf("Address of a = %d",&a);
printf("Value of a = %d",a);
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
Compier Error: '&' on register variable
Rule to Remember:
& (address of ) operator cannot be applied on register
variables.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / chandra
It all depends on C/C++.
On C(GNU C/Visual studio C compiler), it will get a compiler
error.
since the keyword with register is stored in registers of
CPU rather than in memory locations of RAM.
On C++(GNU C++/Visual stdio C++ compiler), variable 'a' will
get an address of memory locations.
since register will automatically take address of memory
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / shrikantauti
Will produce an error as the memory address s not provided.
%u should had written instead of %d
| Is This Answer Correct ? | 0 Yes | 3 No |
Sorting entire link list using selection sort and insertion sort and calculating their time complexity
1 Answers Infosys, Microsoft, NetApp,
Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?
int a=1; printf("%d %d %d",a++,a++,a); need o/p in 'c' and what explanation too
main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }
Write a C function to search a number in the given list of numbers. donot use printf and scanf
char *someFun1() { char temp[ ] = “string"; return temp; } char *someFun2() { char temp[ ] = {‘s’, ‘t’,’r’,’i’,’n’,’g’}; return temp; } int main() { puts(someFun1()); puts(someFun2()); }
Write a routine that prints out a 2-D array in spiral order
main() { unsigned int i=10; while(i-->=0) printf("%u ",i); }
hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?
program to Reverse a linked list
12 Answers Aricent, Microsoft, Ness Technologies,
main() { static int var = 5; printf("%d ",var--); if(var) main(); }
How do you write a program which produces its own source code as its output?