Data:
Discrete:
Discrete:
Data:
passing by reference (function parameter passing) [C++]
To use the address of a variable as a reference to some sort of data contained in the variable to send to some algorithmic function which can use the variable's data to perform some sort of action or solve a problem.
As we all know, a pointer is a special variable that does not hold a specific value, but rather the address of a value (or another variable). In the case of a “pointers to pointers” relationship, a pointer is used not to point to the address of another value, but to the address of another pointer.
A pointer to a pointer is written in code as **(pointer1) = &pointer2; where *pointer2 points to the address of another value/variable.
List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).
#include <stdio.h> #include <stdlib.h> int main(){ int a = 12; int *b; printf("\n"); printf("a is located at 0x%X\n", &a); printf("b is located at 0x%X\n", &b); printf("\n"); printf("b, when dereferenced, points to %d\n", *b); printf("b contains 0x%X\n", b); printf("\n"); b = &a; printf("b, when referenced, points to %d\n", *b); printf("b contains 0x%X\n", b); printf("\n"); return(0); }
asterisk
A programming language to communicate and execute the basic functions of telephony services.
SIP - Session Initiation Protocol
SIP is a signalling protocol. I would guess that that means it is a certain method of having machines communicate. It is typically used for voice and video communication. SIP can be used for two-party (unicast) and multiparty (multicast).
You can modify IPs and ports, invite more people, and add/delete media streams.
SIP can take care of 5 things:
At first I had no idea what SIP was all about and had difficulty understanding it. Now I have a pretty good understanding, I think. I'll probably ask about it next class to make sure I am right, but I feel like SIP is basically just a 'code' of how machines communicate. Just like how humans use English, or Spanish, or Arabic. Computers can use SIP.
On further research, the analogy is fairly sound, but needs a little bit more to it. SIP is basically a specific format that machines can use to communicate. It's a set of certain things that need to be done while communicating. It's not like a language…. it's more like the RULES behind a language.
A demonstration of SIP would be the conversation with another sip registered member and its options. The options/steps are as follows:
INVITE - invites another registered sip to the call with your registered sip.
ACK - acknowledges the request and sends a retrieval of the request acknowledgement.
BYE - ends the conversation between the two sip registered members of the call.
Other things that can happen during a sip situation include but are not limited to:
CANCEL - requesting information about the remote server you are contacting.
OPTIONS - requesting to be registered with the remote server you are trying to contact.
equivalence/if and only if
The opposite of an XOR, if something is T and T, then it would be T when applied.
Definition (in your own words) of the chosen keyword.
List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).
Demonstration of the indicated keyword.
If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:
/* * Sample code block */ #include <stdio.h> int main() { return(0); }
Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:
lab46:~$ cd src lab46:~/src$ gcc -o hello hello.c lab46:~/src$ ./hello Hello, World! lab46:~/src$
X11
A graphical interface used for basic interactions with a user, mostly used in a unix os.
Definition (in your own words) of the chosen keyword.
List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).
Demonstration of the indicated keyword.
If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:
/* * Sample code block */ #include <stdio.h> int main() { return(0); }
Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:
lab46:~$ cd src lab46:~/src$ gcc -o hello hello.c lab46:~/src$ ./hello Hello, World! lab46:~/src$
Is there a way to edit a line of code within a file while running the debugger GDB?
Based on what I've read, I do not believe it is possible to edit a specific line of code in the file you are currently debugging but I do believe it is possible to change the value of a variable to help aid in changing the outcome of a line of code in your program.
My reasoning behind these assumptions are based on the pages I have read about how to use GDB efficiently to debug programs.
To test my assumption, I will be editing a variable within a running program to change the outcome of a line of code, but I do know already there are no options to edit a file running with GDB.
jpettie@lab46:~/src/data$ gcc pointers.c -o pointers -g jpettie@lab46:~/src/data$ gdb ./pointers GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/jpettie/src/data/pointers...done. (gdb) break 10 Breakpoint 1 at 0x40057f: file pointers.c, line 10. (gdb) run Starting program: /home/jpettie/src/data/pointers a is located at 0xFFFFE1DC b is located at 0xFFFFE1D0 Breakpoint 1, main () at pointers.c:10 10 printf("\n"); (gdb) print a $1 = 12 (gdb) print b $2 = (int *) 0x7fffffffe2c0 (gdb) set var a = 13 (gdb) print a $3 = 13
Based on the data collected:
From performing this experiment I have learned that I can change the value of a variable within my program and step backwards in order to find out if the value of a variable is causing an issue with the execution of my program. I would do this by the command “set var” in GDB.
(gdb) print a $1 = 12 (gdb) set var a = 13 (gdb) print a $2 = 13