Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  main.cpp
Language: C/C++
Code:
#include<stdio.h>
#include<stdlib.h>
int main(int argc, char *argv[]){
     if (argc != 2){
        printf("Invalid number of argumentsn");
        return 0;
     }
     int a = atoi(argv[1]);
     int num = a / 4000;
     int off = a % 4000;
     printf("The address %d contains: page number %d offset: %dn",a,num,off);     
     return 0;  
}

          
Comments: