Skip to content

Instantly share code, notes, and snippets.

@mmikhan
Created March 20, 2015 19:32
Show Gist options
  • Save mmikhan/750bb246a174a20a3041 to your computer and use it in GitHub Desktop.
Save mmikhan/750bb246a174a20a3041 to your computer and use it in GitHub Desktop.
Modify the above program to provide border lines to the address.
//
// main.c
// midterm
//
// Created by Md Mazedul Islam Khan on 3/21/15.
// Copyright (c) 2015 Md Mazedul Islam Khan. All rights reserved.
//
#include <stdio.h>
int main(int argc, const char * argv[]) {
// insert code here...
printf("First line : Name\n");
printf("Second line : Diir No, Street\n");
printf("----------------------------------------------\n");
printf("Third line : City, Pin code\n");
return 0;
}
@ankit9787
Copy link

what is that int main(int argc, const char * argv[])

@mayuri-7
Copy link

mayuri-7 commented Aug 5, 2020

The program is not running...

@mmikhan
Copy link
Author

mmikhan commented Aug 5, 2020

@ankit9787 not sure how I missed your query. Apologies for missing this. If you still need the answer, argv and argc are how command-line arguments are passed to main() in C and C++. You can find more information about this here.

@mayuri-7 I don't see anything wrong in the code. Can you please confirm how you are compiling your code? Do you use any IDE? If yes, which one you're currently using? Do you see any errors?

@mayuri-7
Copy link

mayuri-7 commented Aug 5, 2020

Using turbo c..No errrors bt o/p is not displayed on the screen

@mmikhan
Copy link
Author

mmikhan commented Aug 5, 2020

There's definitely something wrong on your setup then as I can confirm the relevant code provided in the gist still works fine as expected. You can test it here.

@coderSHeE
Copy link

what is border line thing ???

@mmikhan
Copy link
Author

mmikhan commented Jan 22, 2022

It's simply a new line

@irenjahan
Copy link

Why did I have put those argument inside the main parenthesis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment