Changes

Jump to: navigation, search

Assignment 1 (Fall 2013) Q & A

501 bytes added, 21:40, 27 September 2013
no edit summary
on the screen, since such displays limit the programmer's ability to design their own screen layouts.</pre>
Q7: Can we use the <ctring> library memmove() function to insert a character to the string?(team 3-Norbert)*Answer: yes you can use it. The fallowing example is from the http://www.cplusplus.com/reference/cstring/memmove/.If you want to know more about the memmove() please visit the website. Syntax:</br>void * memmove ( void * destination, const void * source, size_t num );/* memmove example */#include <stdio.h>#include <string.h> int main (){ char str[] = "memmove can be very useful......"; memmove (str+20,str+15,11); puts (str); return 0;} Output: memmove can be very very useful.
Q8: What is the purpose and functionality of the "strOffset" parameter? This explanation is confusing: "strOffset points to an int variable that holds the initial offset of the string within the field; that is, the index of the character in the string that initially occupies the first character position in the field." Please answer it in simpler terms, maybe with an example as well. -- Fries'n'burg

Navigation menu