SlideShare a Scribd company logo
Write declarations for each of the following variables:
a. amounts is an array of 8 longs
b. net_inc is an array of 12 floats
c. daily_tot is an array of 12 arrays of 31 ints
d. names is an array of 12 pointers to arrays of 50 char
Given that pi and pj are pointers to int, and ii and ij are ints, which of the following
expressions are valid?
a. pi + ii
b. pi + pj
c. pi++
d. pi - ii
e. pi - pj
Write your own definition of strcpy() using array notation. (This means write the code that
implements the function. Refer to Appendix B for the strcpy() function prototype.)
Write your own definition of strcpy() using pointer notation.
Write a declaration, including arguments and result, for a two-dimensional version of
strlen, that is, a function that receives an array of pointers to char and an array of size_t
integers, and an int that specifies the number of elements in each array. (You don't need to
write the actual function.)
Write a function void shift(char *) that looks at the first character of its argument and
converts the other characters, to be the same case, that is, if the first character is uppercase,
it shifts the rest to uppercase; if the first character is lowercase, it shifts the rest to
lowercase, and otherwise, it does nothing.
Write declarations for each of the following variables:       a. amounts is an array of 8 longs

More Related Content

PDF
A nice 64-bit error in C
PDF
Tricks
PPTX
Exercise6 ch2
PDF
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2015]
PDF
[Question Paper] Introduction To C++ Programming (Revised Course) [January / ...
DOCX
Answers+of+C+sample+exam.docx
PPTX
Functions in c++,
PPTX
CSC – 184 Programming C
A nice 64-bit error in C
Tricks
Exercise6 ch2
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2015]
[Question Paper] Introduction To C++ Programming (Revised Course) [January / ...
Answers+of+C+sample+exam.docx
Functions in c++,
CSC – 184 Programming C

What's hot (19)

DOCX
Ankita sharma focp
PDF
P3
PDF
[C++ korea] effective modern c++ study item 4 - 6 신촌
PPTX
Functions (Computer programming and utilization)
PPTX
Polish Notation In Data Structure
PPS
Aae oop xp_06
PPTX
Lecture 1 mte 407
PPTX
Lecture 1 mte 407
PPTX
C++ lab -4
PPTX
C++:Lab 2
PDF
[Question Paper] Introduction To C++ Programming (Revised Course) [January / ...
PPT
Csc1100 lecture03 ch03-pt1-s14
PPT
Csc1100 lecture03 ch03-pt1-s14
PPTX
Labreportofai
PPTX
Presention programming
PDF
[Question Paper] C++ and Java (Old Course) [June / 2014]
PPTX
Pointers
PPT
Expression evaluation
Ankita sharma focp
P3
[C++ korea] effective modern c++ study item 4 - 6 신촌
Functions (Computer programming and utilization)
Polish Notation In Data Structure
Aae oop xp_06
Lecture 1 mte 407
Lecture 1 mte 407
C++ lab -4
C++:Lab 2
[Question Paper] Introduction To C++ Programming (Revised Course) [January / ...
Csc1100 lecture03 ch03-pt1-s14
Csc1100 lecture03 ch03-pt1-s14
Labreportofai
Presention programming
[Question Paper] C++ and Java (Old Course) [June / 2014]
Pointers
Expression evaluation
Ad

Similar to Write declarations for each of the following variables: a. amounts is an array of 8 longs (20)

PDF
Revision1 C programming
PDF
Unit 2
PDF
Basic C Programming Lab Practice
PDF
Arrays and function basic c programming notes
PDF
C faqs interview questions placement paper 2013
PPTX
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_08-08-2022_C_...
DOCX
Functions Practice Sheet.docx
PPTX
Bsc cs i pic u-4 function, storage class and array and strings
PPTX
Diploma ii cfpc u-4 function, storage class and array and strings
PPT
C questions
PPTX
function, storage class and array and strings
PPTX
Btech i pic u-4 function, storage class and array and strings
PDF
Functions torage class and array and strings-
PDF
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
PDF
C_Program_Yr1[1].pdf for computer science
PDF
CBSE Question Paper Computer Science with C++ 2011
DOCX
PPTX
one dimentional array on programming with C
DOC
Revision1 C programming
Unit 2
Basic C Programming Lab Practice
Arrays and function basic c programming notes
C faqs interview questions placement paper 2013
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_08-08-2022_C_...
Functions Practice Sheet.docx
Bsc cs i pic u-4 function, storage class and array and strings
Diploma ii cfpc u-4 function, storage class and array and strings
C questions
function, storage class and array and strings
Btech i pic u-4 function, storage class and array and strings
Functions torage class and array and strings-
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
C_Program_Yr1[1].pdf for computer science
CBSE Question Paper Computer Science with C++ 2011
one dimentional array on programming with C
Ad

More from licservernoida (20)

DOCX
Biol 1322 crn (course number)name datebiol 1322 crn (c
DOCX
Being in the nursing field you will come across many different e
DOCX
Assume that chocolate bliss, the fictitious company in the cours
DOCX
Assignment in this assignment you will start on proposing ideas
DOCX
Assignment 1-case study assignment questionplease re
DOCX
Assignment 1-case study assignment question
DOCX
Assignment strategic planning and financial management pre
DOCX
Assignment 1 supply and demand videoafter reviewing the video you
DOCX
Assignment 1 executive memo you are the ceo of a healthcare or
DOCX
Assignment 1 (to be submitted through the assignment submiss
DOCX
6 the constitution and the new republic· framing a new governme
DOCX
2 the dental hygienists guide tonutritional care
DOCX
2 healthcares vulnerability to ransomware attacks by abhilas
DOCX
1 tenea lewissocw 6301methodological approach
DOCX
1 solitary confinementolen jessiedepartment name, p
DOCX
1.)what actions and behaviors might a health leader perform to proac
DOCX
1.  a family is gathered around in the icu waiting room to monitor t
DOCX
1. the writer has used a letter ing system to describe the
DOCX
1. for this assignment, i want you to pick a popular song (aim to
DOCX
1. considering the information provided in the case study, do you
Biol 1322 crn (course number)name datebiol 1322 crn (c
Being in the nursing field you will come across many different e
Assume that chocolate bliss, the fictitious company in the cours
Assignment in this assignment you will start on proposing ideas
Assignment 1-case study assignment questionplease re
Assignment 1-case study assignment question
Assignment strategic planning and financial management pre
Assignment 1 supply and demand videoafter reviewing the video you
Assignment 1 executive memo you are the ceo of a healthcare or
Assignment 1 (to be submitted through the assignment submiss
6 the constitution and the new republic· framing a new governme
2 the dental hygienists guide tonutritional care
2 healthcares vulnerability to ransomware attacks by abhilas
1 tenea lewissocw 6301methodological approach
1 solitary confinementolen jessiedepartment name, p
1.)what actions and behaviors might a health leader perform to proac
1.  a family is gathered around in the icu waiting room to monitor t
1. the writer has used a letter ing system to describe the
1. for this assignment, i want you to pick a popular song (aim to
1. considering the information provided in the case study, do you

Recently uploaded (20)

PDF
RMMM.pdf make it easy to upload and study
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Sports Quiz easy sports quiz sports quiz
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
master seminar digital applications in india
PDF
Computing-Curriculum for Schools in Ghana
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Institutional Correction lecture only . . .
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
RMMM.pdf make it easy to upload and study
Module 4: Burden of Disease Tutorial Slides S2 2025
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Sports Quiz easy sports quiz sports quiz
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
TR - Agricultural Crops Production NC III.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
master seminar digital applications in india
Computing-Curriculum for Schools in Ghana
human mycosis Human fungal infections are called human mycosis..pptx
102 student loan defaulters named and shamed – Is someone you know on the list?
Anesthesia in Laparoscopic Surgery in India
Institutional Correction lecture only . . .
O5-L3 Freight Transport Ops (International) V1.pdf
PPH.pptx obstetrics and gynecology in nursing

Write declarations for each of the following variables: a. amounts is an array of 8 longs

  • 1. Write declarations for each of the following variables: a. amounts is an array of 8 longs b. net_inc is an array of 12 floats c. daily_tot is an array of 12 arrays of 31 ints d. names is an array of 12 pointers to arrays of 50 char Given that pi and pj are pointers to int, and ii and ij are ints, which of the following expressions are valid? a. pi + ii b. pi + pj c. pi++ d. pi - ii e. pi - pj Write your own definition of strcpy() using array notation. (This means write the code that implements the function. Refer to Appendix B for the strcpy() function prototype.) Write your own definition of strcpy() using pointer notation. Write a declaration, including arguments and result, for a two-dimensional version of strlen, that is, a function that receives an array of pointers to char and an array of size_t integers, and an int that specifies the number of elements in each array. (You don't need to write the actual function.) Write a function void shift(char *) that looks at the first character of its argument and converts the other characters, to be the same case, that is, if the first character is uppercase, it shifts the rest to uppercase; if the first character is lowercase, it shifts the rest to lowercase, and otherwise, it does nothing.