Saturday, March 18, 2017

100 model schools to be setup in GB: CM

Chief Minister Gilgit Balistan (GB), Hafiz Hafeezur Rehman Thursday said that his government was providing free books to students of class-I to class-X to promote education and 100 model schools would also be setup during next five years in province.
He said these positive measures had significantly increased enrollment in government schools and 1,65,000 children were being provided free books. He said provision of free books would help poor students to continue their studies without financial constraints.

NAVTTC imparting technical skills

To observe the practical training being imparted to the trainees under the current phase of Prime Minister’s Youth Skill Development Program, the executive director NAVTTC, Zulfiqar Ahmad Cheema, visited various training institutes today including Govt. College of Technology, Rasul of District Mandi Bahauddin and Applied Technology Institute, Dina.

Future generations must be protected from toxicity: VC

The Vice Chancellor Sindh Agriculture University, Tando Jam Dr. Mujeebuddin Sahrai on Thursday said that we must protect our future generations from the toxicity effects due to the excessive use of pesticides and chemical fertilizers by raising awareness and promoting use of less toxic alternatives.
He was speaking at a stakeholder’s consultation workshop which was conducted as a part of the study being carried out by Global Environmental Management Services (Pvt) Limited (GEMS) for the Sindh Environmental Protection Agency (SEPA).

SU for innovative student-friendly initiatives

The Vice Chancellor University of Sindh, Prof. Dr. Fateh Muhammad Burfat has launched another innovative initiative of establishing International Standards Organization (ISO) Cell at Syed Ghulam Mustafa Shah Administration Building on Thursday.

21 e-Libraries to be set up in Punjab: Shahbaz

LAHORE: (APP) Headway on the programme of establishing E-Libraries in Punjab was reviewed in a meeting presided over by Punjab Chief Minister Muhammad Shehbaz Sharif here Thursday.

Addressing the meeting, the CM said the Punjab government was setting up state-of-the-art e-libraries in various cities of the province which would give contemplate study opportunities to residents in a conducive atmosphere that would also help to restore dying reading culture.

Fazl asks students to exercise restraint

DERA ISMAIL KHAN: Jamiat Ulema-e-Islam-Fazl (JUI-F) chief Maulana Fazlur Rahman on Thursday urged the seminary students to discourage the use of force and dedicate their lives to the cause of humanity.

He was speaking at the certificate distribution ceremony among the students who completed studies at the Jamiatul Arifia Al-Sharia here. The Maulana said that Islam is the religion of peace, adding the JUI-F believed in a peaceful struggle for implementation of Islamic law in the country.

US students term Hijab symbol of feminism, empowerment

WASHINGTON: While the issue of Hijab for students in Punjab has created a heated debate among mainstream Pakistani political parties, scarf-wearing Muslim students in the United States have termed Hijab a symbol of their empowerment and feminism.

Since the election of President Donald Trump, Hijab is emerging as a symbol of resistance to Islamophobia amid policies from the Trump administration targeting Muslim immigrants. As a part of its series on women of America, a mainstream American newspaper USA Today carried interviews of Muslim university students who defended their right to wear Hijab as an empowering tool.

Tuesday, March 14, 2017

Functions: Overloading and Default Parameters

Function Overloading

The term function overloading refers to the way C++ allows more than one function in the same scope to share the same name -- as long as they have different parameter lists
  • The rationale is that the compiler must be able to look at any function call and decide exactly which function is being invoked
  • Overloading allows intuitive function names to be used in multiple contexts
  • The parameter list can differ in number of parameters, or types of parameters, or both
  • Example: The following 3 functions are considered different and distinguishable by the compiler, as they have different parameter lists
       int Process(double num);    // function 1
       int Process(char letter);              // function 2
       int Process(double num, int position); // function 3
    
  • Sample calls, based on the above declarations
       int x;
       float y = 12.34;
       x = Process(3.45, 12); // invokes function 3
       x = Process('f');  // invokes function 2
       x = Process(y);  // invokes function 1 (automatic type conversion applies)

Functions

Functions

A function is a reusable portion of a program, sometimes called a procedure or subroutine.
  • Like a mini-program (or subprogram) in its own right
  • Can take in special inputs (arguments)
  • Can produce an answer value (return value)
  • Similar to the idea of a function in mathematics

Why write and use functions?

  • Divide-and-conquer
    • Can breaking up programs and algorithms into smaller, more manageable pieces
    • This makes for easier writing, testing, and debugging
    • Also easier to break up the work for team development
  • Reusability
    • Functions can be called to do their tasks anywhere in a program, as many times as needed
    • Avoids repetition of code in a program
    • Functions can be placed into libraries to be used by more than one "program"

Control Structures

Control Structures - Intro, Selection

Flow of Control:

Flow of control through any given function is implemented with three basic types of control structures:
  • Sequential: default mode. Sequential execution of code statements (one line after another) -- like following a recipe
  • Selection: used for decisions, branching -- choosing between 2 or more alternative paths. In C++, these are the types of selection statements:
    • if
    • if/else
    • switch
  • Repetition: used for looping, i.e. repeating a piece of code multiple times in a row. In C++, there are three types of loops:
    • while
    • do/while
    • for

CPSP fellows, post graduate trainees interviewed for service in UK

A team of doctors from University of Birmingham, UK is on a visit to Pakistan on invitation of College of Physician and Surgeons Pakistan (CPSP) for interviewing CPSP fellows and postgraduate trainees for two-year on-job training in UK.


The team comprising Mike Hallissey, Dr Phil Bright and Dr Javid A Kayani is interviewing fellows of CPSP for further training in Birmingham University Hospital for a period of two years in different specialties while postgraduate trainees who have cleared Intermediate Module exam are also being interviewed and the successful candidates would be sent to UK for further training of two years in various subjects.

Lecture on disaster management

Riphah International University and Rescue 1122 jointly organised a seminar on ‘Disaster Risk Management’ here on Monday.

The purpose of the seminar was to equip the university students with the latest developments and trends in the emergency and relief activities. District Emergency Officer (DEO) Dr. Abdul Rehman was the guest speaker in the seminar. Large number of students participated in the seminar.

AIOU conducts research work on early childhood development

Allama Iqbal Open University (AIOU) will start soon research work on early childhood development to fulfill its academic responsibility in the nation-building for a better future.

A research journal on early childhood will be published by the end of this year. Besides this, the University will host National conference on the related subjects on annual basis as part of its consistent efforts of contributing to the country’s socio-economic development.

Pak Youth most precious asset: Gen Bajwa

RAWALPINDI (Dunya News) - Chief of Army Staff (COAS) General Qamar Javed Bajwa on Monday met a contingent of 40 college students from remote areas at the General Headquarters, reported Dunya News.



Inter Services Public Relations (ISPR) revealed that the meeting was part of the COAS Youth Encouragement Programme.

BZU opposed proposed merger of its two colleges with other varsities

MULTAN: The administration of the Bahauddin Zakariya University has decided to oppose a proposal for the merger of its engineering and agriculture colleges with the Muhammad Nawaz Sharif University of Engineering and Technology (MNSUET) and Muhammad Nawaz Sharif University of Agriculture (MNSUA), respectively.

A meeting of the MNSUET steering committee to discuss the merger of both the colleges with the two universities has been called by the Planning and Development Department on March 16 which will be presided over the by P&D Board Chairman Muhammad Jahanzeb Khan.