>This should be the 100% correct
You'd be wise to avoid that claim around here. There are some pretty smart people hanging around who will prove you wrong. For example: 
>printf("enter n value:");
While your implementation is nice enough to flush stdout after this call, not all implementations will do so. In those cases, the only way this prompt will be visible before scanf starts to block for input is if you're lucky enough that the output buffer gets filled up at this point and flushes automatically. Rather than rely on luck or implementation specifics, your code would be more correct to force a flush on stdout:
Code:
printf ( "Enter n value: " );
fflush ( stdout );
>scanf("%d",&n);
You can't claim your code to be correct because if scanf fails, you've invoked undefined behavior by accessing the indeterminate value of n. Of course, some people don't really care about undefined behavior, so imagine calling malloc with a completely unpredictable size. Even worse, some compilers will kindly initialize local variables to 0, and that's a can of worms with malloc that you don't want to deal with. Your code would be more correct if it took into account scanf failure:
Code:
if ( scanf ( "%d", &n ) == 1 ) {
/* Use n to allocate memory */
}
else {
/* Handle an input error */
}
>m=(int *)malloc(n*sizeof(int));
This isn't technically an error because you've posted a snippet, but I'll mention that the return value of malloc should always be checked for NULL. Also, it's more correct in C not to cast malloc because the cast can hide a legitimate error of forgetting to include stdlib.h. Since you're removing the cast, you can also remove all mention of m's type (which helps a lot if you decide to change the type):
Code:
m = malloc ( n * sizeof *m );
if ( m == NULL ) {
/* Handle an allocation error */
}